You are using the wrong function. wp_insert_post()
is for creating posts. You need wp_update_post()
if you want to update existing data.
You are using the wrong function. wp_insert_post()
is for creating posts. You need wp_update_post()
if you want to update existing data.