Turn off Post Revisions in WordPress 2.7

Written by Vikas SN

Topics: Wordpress

AutosaveThough I just love the new features of WordPress 2.7,  one of its most nagging things is "Post Revisions".  If you don’t know what Post Revisions is, well it is a wiki like tracking system for both Posts and Pages which might come in handy for multi author blogs.

It keeps every post revision in the wp-posts database. Sometime and some posts later, the database will keep on getting bigger and finally becomes a big bloated database.

Fortunately, there are ways to disable the Post revisions, if you don’t want it.

The Manual Way

1. Open your wp-config.php file which is usually in the wordpress home directory.

2. Now Add this line

define(’WP_POST_REVISIONS’, false);

and save the file.

Thats all, Now WordPress will not attempt to save  any revisions, except the one AutoSave per post.

Plugins

Well, if you don’t want to risk the manual way, you can try the Revision Control Plugin. This plugin give the complete control to the user whether he want to enable/ disable Post revisions. You can also limit the number of post revisions or even delete specific post revisions via this plugin.

Now, you might ask, what about the existing revisions? How to delete that?

Well, that is simple as well, All you need to do is run a simple SQL query on your database and you will be done.

At this point, I would recommend you to take a backup of your database, just in case, something goes wrong in the process.

Once Backup is done, Just open your phpMyAdmin or anything else you use for database access, and run this query

DELETE FROM wp_posts WHERE post_type="revision";

That is all. Now all the post revisions have been deleted and as well as the post revisions feature have been disabled.

When I did the above procedures, I reduced my database by 2.5 MB.

Impressive, Ain’t it?

  • http://www.shoutmeloud.com/ Harsh Agrawal

    I use Revision control plugin and I think it should be in the must have wordpress plugin. Though post revision is a great feature of wordpress but I feel annoyed when I see more then 4 post revision. They kill my storage and database. Its better to shut them down using Post revision plugin.

  • http://www.shoutmeloud.com/ Harsh Agrawal

    I use Revision control plugin and I think it should be in the must have wordpress plugin. Though post revision is a great feature of wordpress but I feel annoyed when I see more then 4 post revision. They kill my storage and database. Its better to shut them down using Post revision plugin.

  • http://www.techknots.com Vikas SN

    Ya. I didn’t know it takes so much space. According to me, Post revisions are good only for Multi Author Blogs. All the single author blogs dont require it at all.

  • Vikas SN

    Ya. I didn’t know it takes so much space. According to me, Post revisions are good only for Multi Author Blogs. All the single author blogs dont require it at all.

  • http://www.shoutmeloud.com/ Harsh Agrawal

    You are right Vikas . Though even in multi author blog for old blog posts post revision become uselss.

  • http://www.shoutmeloud.com Harsh Agrawal

    You are right Vikas . Though even in multi author blog for old blog posts post revision become uselss.

  • http://www.techknots.com Vikas SN

    Hmmm ya, You have a point there.

  • http://www.techieblues.com/ Vikas SN

    Hmmm ya, You have a point there.

  • Santosh

    Thanks buddy! Was looking for a plugin to do this.

  • Santosh

    Thanks buddy! Was looking for a plugin to do this.

  • http://www.techknots.com Vikas SN

    Anytime Mate :)

  • http://www.techieblues.com/ Vikas SN

    Anytime Mate :)

blog comments powered by Disqus