Disable revisions

In WordPress a revision (copy) of a post is saved each time you save it. This way WordPress enables you to go back to a previous version of a post (remember, a page is also a post). Although this might sound like a feature that may come in handy, most people never use this.

A big disadvantage of this feature is that each revision is another post in your database. So if you’re quite an active ‘saver’ like me (I save most blog posts around 20 times), you’ll take up allot more database space (in my case 20 times more) while never going back to a previous version of a post!

Luckily we can deactivate revisions with a single line of code. Just add the following line to your wp-config.php file and revisions will be disabled.

define('WP_POST_REVISIONS', 0);

If you want to be able to go a few revisions back but don’t want to store all revisions ever made, change the 0 to the desired amount of revisions you would like to keep.

Related Posts

Powered By Related Posts for WordPress
Click Here to Learn More About Related Posts for WordPress

6 thoughts on “Disable revisions

  1. Me too..
    I’ll also save single post a alot of times, i haven’t thought about the database space…
    I don’t need the revisions also…

    I”ll also disable the revisions…

  2. Sounds to me that this should have been out of the core in a plugin (like the Import tool), or at least disabled by default. I get really annoyed by this feature.
    Thanks for the snippet.

  3. […] found this post yesterday by Barry Kooij that gives you a quick and simple way to drop the bulk and streamline your […]

  4. this does not work to disable revisions, i applied it and revisions are still being made…

Leave a Reply

Your email address will not be published.