• I have an old postnuke sql file that no longer resides in a db. I’ve stripped it down to the title, time and post, and want to drop all the old posts (100+) into my new wordpress blog. I can build the “insert into…” commands for the wp-posts table but what do I need to do in the wp-postmets and wp-post2cat tables to get them to jive?

    My plan is to start at my last post number (47) and add from there the commands:

    INSERT INTO wp_posts VALUES (1, 48, '2006...

    Am I up in the night? Will this work? Pitfalls?

Viewing 3 replies - 1 through 3 (of 3 total)
  • wp_postmeta -> Holds the custom field data.

    http://codex.wordpress.org/Using_Custom_Fields

    Unless you have some sort of “meta” data related to your postnuke material that you wish to carry over into WordPress, you don’t have to worry about this one.

    wp_post2cat -> Holds post to category relationship. Basically your import method should work, but the posts will not have any categories assigned to them. You can take care of this manually in WordPress after the import, or you can perform similar inserts on the post2cat table by using something like:

    INSERT INTO wp_post2cat VALUES (NULL, 48, 1);

    where the second value equals the post ID, and third is the category ID.

    Thread Starter kayaker

    (@kayaker)

    Thanks! I figured it out with your help. Am I satisfied? Oh no… now I want more, but have a meager offering.

    I cleaned up my OpenOfficeCalc sheet, saved it into Excel also, and talked a bit about what I did in this post!

    How to bulk import posts into WordPress with Excel and MySQL. I converted an old PostNuke database.

    Now for my next question:

    “How can I get these same imported posts in to multiple categories?” I don’t understand databases well, but I’m trying.

    How can I get these same imported posts in to multiple categories?

    INSERT INTO wp_post2cat VALUES (NULL, 48, 2);
    INSERT INTO wp_post2cat VALUES (NULL, 48, 3);

    Just keep adding an insert for each category a post belongs to.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Maual SQL Post Upload: What are the wp-postmeta and wp-post2cat tables?’ is closed to new replies.