• Hi guys, I want to move my wordpress content into another wordpress blog on a subdomain. I have moved all the posts I want into a category, say, the “best of” category – and I want all the posts, and comments from this category, to be exported into the other blog.

    Which mysql rows should I export (in phpmyadmin), and if there’s a faster way of doing so via a sql query, what should the syntax be like? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • How many “other” posts do you have? It may not be worth separating them before migrating them. Also, are you going to use the same basic setup or start from scratch with something new?

    In any event, WP stores all the entries in the “_posts” table. The first thing you need to do is go to your WP Dashboard under Manage, Categories, and find the category ID of the category you want to export. Don’t forget that number! In PHPMyAdmin, click on that table. Then click the tab “Browse.” You’ll see the posts in post ID order. Scroll over a bit and you’ll see a column “post_category.” Click on it to sort the posts by category id, then scroll down until you see that category ID of posts. Check them all and then export to a *.sql table.

    Ooh, comments. Someone else may have to help with that. They are sorted by comment_post_id. I guess when you are browsing the _posts table you can write down the post ids of all the relevant posts. Then go back to the _comments table and find the matching comment_post_ids there and check only those to export along with your entries. There surely has to be a better way to do that.

    If you’ve already assigned your posts to the desired category, the easiest way to fetch everything is to view the RSS feed for that category. Save the feed as a file, and then specify that file as the source for import-rss.php WordPress importer.

    I think. I’ve never actually done an RSS import.

    Then you could use the comments feed for each post to import comments.

    I have posted about importing a few posts from a blog to another – take a look at it, maybe it can help to figure out the process.
    It is here.

    Thread Starter skinnylatte

    (@skinnylatte)

    Thanks guys!
    Ludo ran me through it one step at a time, if anyone’s interested.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Export WordPress Content in One Category Only’ is closed to new replies.