Possibly my favorite feature introduced in WordPress 2.6 was the wiki-style document revisions.  You can now easily get access and/or restore old revisions.   It took a few days to get used to, but I have to say I really love it!

I’ve always felt that this feature was intended primarily for multi-author blogs and probably isn’t needed for most WordPress bloggers, as it only serves to grow your wp_posts database table.   If you are someone that would like to disable this feature, all you need to do is open your wp-config.php file and add the following code:

define('WP_POST_REVISIONS', false);

This should restore WordPress to handling posts the way it did in the WordPress 2.5 branch and earlier!

Want automatic updates? Subscribe to our RSS feed or
Get Email Updates sent directly to your inbox!
Tweet This | Digg This | Stumble it | Add to Del.icio.us | | Print This

Kyle Eslick

Kyle Eslick is the founder and primary author of WordPress Hacks. You can learn more about him at KyleEslick.com or you can follow his personal tweets here.

There Are 10 Responses So Far »

  1. Mehmet says:

    Post revisions brings a great feature to end users but I am still trying understand reason of why the published posts and the history are being kept on same place in wp_posts. I believe, obviously wp_post table is going to be filled with tones of unnecessary informations.

    I believe, that it would be a better idea if there would be a wp_post_revisions table to keep history of posts.

  2. Frank says:

    alternativ you can set a value for the count of revisions:
    define(‘WP_POST_REVISIONS’, ‘3′);

  3. For those who don’t want to mess with code modifications, I’ll be implementing revision-disabling via a checkbox in version 1.9 of the WordPress Tweaks plugin.

  4. Kyle Eslick says:

    @ Mehmet – Yeah, that is kind of along the lines of what I was thinking. 
    @ Frank – Thanks for adding another solution!

    @ John – Awesome!  I was hesitant to post this because if people screw up their wp-config file trying this, they get mad at me even though the directions are correct.  :mrgreen”

    Adding this to your plugin is a great solution!

  5. @Kyle & Frank: Great tips, thanks a lot!

  6. zania says:

    Post Revisions is one of the reasons I was reluctant to upgrade to 2.6, so thanks for the easy to understand solutions Kyle and Frank.
    Much appreciated.
    And I’m looking forward to the update of your plugin John.

  7. Matrich says:

    Kyle, thanks for this.

    I really too thought that though post revision is a gr8 thing, it isn’t very useful for personal single-author blogs.

  8. Michael says:

    Thanks for the tips, I don’t really have any use for the post revisions so getting rid of them would be nice. All that extra junk in the database is useless.

  9. Jonnya says:

    Just to let you know I have included the ability to turn off (and back on!) post revisions in WordPress with my WP-CMS Post Control plugin

    It also allows you to hide the Post Revision menu, but still keep the function active
    in addition to being able to disable the Flash uploader and auto saves. The plugin also allows you to hide all aspects of the WordPress 2.6 write panels, including tags, custom fields… you name it!

  10. BloggerSavvy says:

    Quick question, anyone know what the MySQL statement to properly remove all revision info from the database? – Thanks.

Trackbacks/Pingbacks »

Leave a Reply