retreiving the sql of all current posts (6 posts)

  1. copesdesign
    Posted 6 years ago #


    I've been asked to move a blog away from using wordpress but to keep all posts, i've noticed wordpress seems to use a post/revision system in the sql db.

    If it do something like this:
    SELECT * FROM wp_websitename_2009_posts WHERE post_type="post"

    Will this give me all blog posts which are up to date, or do the revision posts hold the updated blog entries for these posts?


  2. Anonymous
    Posted 6 years ago #

    You can export all the posts on your WordPress based blog/site right from your WordPress dashboard by going to tools -> export.

  3. copesdesign
    Posted 6 years ago #

    Yes i saw this option, but the xml produced uses alot of <wp:> specific tags.

    It will be alot easier for me if i can use a raw sql export. I'm just not sure which data i actually need to export from this.

  4. esmi
    Forum Moderator
    Posted 6 years ago #

    To be on the safe side, you really need to dump the entire database into an sql.

  5. Mark / t31os

    Posted 6 years ago #

    Backup the database first, then just start dumping/dropping data you don't need.. (export what's left at the end).

    A post with the post_type revision is just that, a revision, so no it's not anything important, unless you want to keep revisions.

    wp-content folder holds any uploaded items, images, themes or plugins.

    For actual content, you'll find that's mainly in the database.

  6. copesdesign
    Posted 6 years ago #

    I can get the majority of what i'm after using:

    SELECT * FROM wp_websitename_2009_posts WHERE post_type="post" AND post_status="publish";

    Obviously this won't get the comments or anything like that but that can be exported seperatly and compared to each post.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.