300x250 How To: Turn Off Post Revisions in WordPress 2.6+

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!
  • Print This
  • Kyle Eslick is WordPress enthusiast who took his passion for WordPress to the next level in 2007 by launching WPHacks.com as a place to share hacks, tutorials, etc. Connect with Kyle on Twitter or Google+!

    There Are 10 Responses So Far »

    • http://www.gabfire.com Mehmet

      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.

    • http://bueltge.de/ Frank

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

    • http://wordpress.jdwebdev.com John Lamansky

      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.

    • http://kyleeslick.com Kyle Eslick

      @ 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!

    • Pingback: Como desligar revisão dos posts no Wordpress 2.6 | Open Mania

    • http://www.catswhocode.com Jean-Baptiste Jung

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

    • http://frayingedges.com/ zania

      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.

    • http://www.matrich.net/ Matrich

      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.

    • http://cybersurge.org Michael

      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.

    • Pingback: WordPress Weekend Resources - August 1, 2008 | Theme Lab

    • http://www.wp-cms.com Jonnya

      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!

    • Pingback: 100+ Killer Wordpress Resources | Steffan Antonas' Blog

    • http://bloggersavvy.com BloggerSavvy

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