New post from database

With few lines of code you can transfer your data from your custom table to post table.

  1. Do some MySQL query using $wpdb Object to get data from your custom table.
  2. And then in foreach() loop use wp_insert_post and add_post_meta to add all those rows in your post table.

And you are Done!