How to Delete Post Revisions WordPress

Following yesterday’s post about Turning Off Post Revisions today I’m going to show you how to delete those revisions from the data base.

It’s very simple. Open your PhpMyAdmin or wherever you can administrate your data base and run the following query:

Note: Backup your data base before continuing!
Note 2: please notice that maybe your tables tag are diferent. If your table is called XX_posts and not wp_posts just change that in the query.

Running this query in my personal blog time ago it deleted about 10,000 revisions 😉

3 Responses to “How to Delete Post Revisions WordPress”

  1. Jexweber March 24, 2010 at 10:38 am #

    I have WP-Optimize plugin for wordpress, you can remove all post revision easily.
    I prefer save all post revisions and if is necesary recover one post lost.

    • quicoto March 24, 2010 at 10:44 am #

      In fact you’re not losing any post just the X revisions of that post.

      For me it’s useless to have 20 revisions each post 😉

      Thanks for commenting Jexweber.

      • Jexweber March 24, 2010 at 10:51 am #

        Yes I know, but I want have post revisions and then erase it when I want, I’ve lost many post for I’ve not active post revisions.

Leave a Reply

Add <code> Some Code </code> by using this tags.