• Resolved Sub_Zero

    (@sub_zero)


    Hi,

    I have some data on my Typo3 database and I want to import it to my wordpress custom post type. It should be the content of the CPT. Since there are more than 500 pages, I don’t want to create them manually. So is there a way I could create these pages using SQL only? Like create me 500 posts into the custom post type and take the xy row as their content?

Viewing 2 replies - 1 through 2 (of 2 total)
  • There is, but it’s not as easy as adding the data to a single table. WordPress stores post/page/etc data in wp_posts and wp_postmeta so you’ll need to look at both of those.

    The easy way to do it is to use the standard WordPress functions like wp_insert_post() and add_post_meta() so that you know that everything is stored the right way with the right database keys and references. It’s not hard to write a small script that can do that.

    Thread Starter Sub_Zero

    (@sub_zero)

    This helps me a lot. I didn’t know about these functions. Thank you so much!!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Create wordpress pages using SQL only’ is closed to new replies.