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.
[…] Disable revisions » […]
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…
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.
[…] found this post yesterday by Barry Kooij that gives you a quick and simple way to drop the bulk and streamline your […]
this does not work to disable revisions, i applied it and revisions are still being made…
Hi Lloyd,
Could you try placing it right after the ‘DB_COLLATE’ line?
Best,
Barry