You should insert posts with wp_insert_post
and update posts with wp_update_post
. wp_update_post
will add a revision to the database and update the published/draft post data.
You should insert posts with wp_insert_post
and update posts with wp_update_post
. wp_update_post
will add a revision to the database and update the published/draft post data.