WordPress.org

Support

Support » How-To and Troubleshooting » retreiving the sql of all current posts

retreiving the sql of all current posts

  • Hello,

    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?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • You can export all the posts on your WordPress based blog/site right from your WordPress dashboard by going to tools -> export.

    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.

    esmi

    @esmi

    Forum Moderator

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

    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.

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘retreiving the sql of all current posts’ is closed to new replies.
Skip to toolbar