Delete Old Post Revisions and Free Up Space in Your WordPress Database

Saved post revisions can be a lifesaver in WordPress. If something goes wrong and you need to access a previous saved version of your post, it’s right there for you, waiting to be clicked on at the bottom of your editor.


Lots and Lots of Revisions

If you’ve worked with WordPress for a while, then you’ve no doubt been saved by the post revisions feature a time or two. But you’ve probably also noticed that those revisions tend to add up.

If you write your post in your editor, then WordPress is saving revision after revision as you go along. In fact, it’s not unusual to have 20+ versions of a post. Multiply that by the number of posts on your site, and you get a ton of extra posts stored in your database.

Featured Plugin - WordPress Google Maps Plugin

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Getting Rid of Old Revisions

Some people don’t like all those old revisions hanging around in their database. They believe the revisions slow down their site.

That, however, may be a myth.

According to co-founding developer of WordPress Mike Little in the comments on this post at WPBeginner, “WordPress’ database queries do *not* retrieve revisions, so the number of revisions has no effect on the queries. The only time the revisions are retrieved is on the edit page of the individual post. There is no impact on the front end speed of your site.”

If anyone would know, it seems Mike would know. However, many still maintain that having a smaller and lighter database can only be a good thing, and so they still choose to get rid of their old revisions.

If you’re one who would be in that camp, then one of the three plugins below should help you do that. Each has a very unique way in which it goes about its duties, however, and so you should read through each description to see which suits you best.


1. Better Delete Revision – Download Here

The Better Delete Revision both deletes old revisions and also optimizes your database.

As the plugin page says, “With optimization and old revision removal this plugin will keep your database lighter and smaller throughout use. Removing old revisions and database optimizations is one of the best things you can do to your WordPress blog to keep it running as fast as it can.”

Here’s a look at the plugin settings page as well as the deletion process.

Featured Plugin - WordPress Pop-Up Chat Plugin

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

2. Revision Control – Download Here

The Revision Control plugin is different from Better Delete Revision plugin in that it does not perform bulk deletions of your revisions; however, it does give you two features that the Better Delete plugin doesn’t include.

It lets you first determine the number revisions to store.


And it also allows you to delete individual revisions via a box on your editing screen.



3. Revision Cleaner – Download Here

The Revision Cleaner plugin adds yet another twist on revision deletion. It allows each user to set a time interval for automatic deletion of his/her revisions. This is done on the user’s profile page.

First we’ll take a look at the administrator’s setting page which allows you to give users permission to set their own intervals.


And here’s a look at the controls on a user’s profile page.

So, there you have it: three different plugins, three different ways to go about revision deletion.

Featured Plugin - WordPress Facebook Plugin

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Comments (8)

  1. While Mike is correct in saying that WordPress database queries don’t retrieve revisions, that’s only really true on the front-end. When editing a post or page, WordPress attempts to retrieve *all* revisions of a post, which can start to cause serious problems in certain installations.

    On one particular server, the memory limit was set somewhat low, and some of the pages being edited contained a *lot* of content. After editing the pages over and over again, they’d eventually get to the point where trying to edit the page would throw a fatal PHP error because it had exceeded the memory limit.

    In addition to the options shown in this post, you can also specify a constant (WP_POST_REVISIONS) in wp-config.php that limits the number of revisions stored for each post/page. However, it’s important to note that WordPress doesn’t remove the old revisions that exceed the specified number until you save the post again (so, doing this alone did not solve the fatal PHP error I encountered on that one server – I had to go in and delete enough revisions to get the edit page to load properly first, then save the page, then WP deleted the rest of the excess revisions).

  2. hi there Joseph.. i think i prefer the better delete revision manager :) i will try it ..thanks for the info

    i am using the thin out revision plugin but i am not sure how to use it. i think its more on scheduling deletion.

  3. Among therse plugins the only version which works with current latest Worpress (WP 3.6.1) is Revision Control and when i installed these plugin, i set the maximum number of revision for posts to 5 but i still see that some posts have i.e 20 revisions and nothing si changed. How this plugin delete old revisions? Is there any other plugin to delete old useless revisions which works for WP 3.6.1 ?

    • Alexis — As this post was published a while ago now, I’m not really sure. But one good way to find plugins is to put the name of one of the above plugins into the search box in your plugin admin area of your site. That will usually bring back related plugins as well.

      • Thanks a lot for your reply. Finally i have found a great plugin for deleting both revisions and many more other parts of WordPress. The name of this plugin is “Bulk Delete” and i suggest you to write about it as i am sure it will be very useful for most users.