How To Disable The Annoying Post Revision Option

WordPress comes with an option that will save old versions of a post you are in the process of writing, A lot of people are unaware of this feature but you may have noticed that sometimes a red box will appear informing you that there is a newer post than the one you are creating.

I am not sure about you but I find this feature very annoying. I have no use for it anyway as I write my posts using Open Office and then just copy and paste it, and I’m assuming there are many people who do this.

There is another problem with this post revision feature, each revision takes up space in your database. I have a growing database and I really could do without every post having numerous revision.

So why not get rid of it?

WordPress do not offer a way to disable it in your Admin settings section so we will have to go under the bonnet, don’t panic it isn’t that hard. But just to be on the safe side back-up your database and save the wp-config.php file first.

1 Open up the wp-config.php file.

2 Add the following code to the file:

define(β€˜WP_POST_REVISIONS’, false);

You now need to open up your database.

1 Open up PHPMyAdmin (or whatever your host uses).

2 Run the following SQL query:

DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = ‘revision’

That’s it. The saved revision should now be deleted from the database and WordPress will not save any more.

Do you like using the post revision option?

Dean Saliba

Dean Saliba is a freelance writer, professional blogger, media enthusiast, dirty football player and huge professional wrestling fan who covers a wide range of subjects and niches including, making money online, traffic generating, pro wrestling, blog reviews, football, how-to guides, music, internet marketing and more.

10 Comments

  • Thanks for the tips, I found this very annoying to as I post much the same way. One of my other websites had over 500 post revisions because they had auto-saved so many items. Luckily there are a few plug-ins which clear it all up, but stopping it completely like this will be much more helpful.

    Simon

    • I have seen the plugins and I’m sure they do just as good a job, but I have enough plugins clogging up my blog and was looking for a way without adding another one. πŸ˜€

      • Yeah I’m always wary about adding new plugins nowadays, they are normally very helpful but you just have to think how useful are they in comparison to the speed drop, even minute may make someone leave. Anyway going off topic πŸ™‚

        • You might be going off topic but you are making a very good point. πŸ™‚ I recently gave this blog a bit of a clean up and I had accumulated 37 plugins that were active. A lot of them I did not need and have wittled it down to 25, I still think is too much. πŸ™‚

  • I use Wp Optimize plugin to get rid of them all but if this could rid of them permanently, all the better then. BTW Happy New Year man πŸ˜‰

  • I actually like this feature, but I retweeted the post for those that don’t πŸ™‚

    Still, this is good info to know in case I ever change my mind. Thanks, Dean!

    • Thank you very much Tristan. πŸ˜€

      I had a suspicion when writing this that a few people would like having the post revision turned on. As you say, helpful for those of us who want it turned off. πŸ™‚

  • I have not encountered such in WordPress. Or maybe I am just a bit oblivious so I was not able to spot the difference. Nevertheless, this is useful for upcoming similar issues. Thank you!

Comments are closed.