Bulk move (or copy) from a custom field to the post content?

For SQL, the post’s content is saved in “wp_posts” table under “post_content” column. When doing this from phpmyadmin, you’ll have to take care that you’re updating only the main post & not one of it’s revisions

If you’re looking for some wordpress based solution, the wordpress way to do it is to use wp_update_post

// Update post 37
  $my_post = array();
  $my_post['ID'] = 37;
  $my_post['post_content'] = get_post_meta($my_post['ID'], 'meta_key', true);

// Update the post into the database
  wp_update_post( $my_post );

Leave a Comment