How to Delete WordPress Revisions

Posted in Wordpress Maintenance by 3 comments

how to delete wordpress revisionsThe best practice when you want do something new on your website and you think you can mess things up is to create a backup of your database before you do anything in the first place.

Yesterday, I was creating a back up of the database of a client’s website and it was around 8 MB. It may not sound like a lot but when you have to transfer  it many times over, the waiting time can become tedious.

Have you tried backing up the database of your WordPress blog manually? Then you know how it is.

Afterwards I decided to delete all the revisions because it were a total of  5000 posts and the database went to only a bit under 3MB in zipped file storage.

WordPress Revisions

In WordPress 2.6  introduced as “ wordpress revision”, this feature basically creates a copy of the previous version of your post while you edit it. When you have a small website it’s not big of a deal, but with older websites with hundreds of posts it can clutter your database. So I highly recommend to clean up the database every now and then.

How to delete WordPress revisions

There are couple of different methods to delete the post revisions. Many people try to delete WordPress revisions by running a MySQL query in the database using a tool like phpMyAdmin.

The problem with doing so is that it doesn’t solve the cluttering problem a hundred percent. WordPress stores information in two different locations in the database. One in  which the post content is stored and two where WordPress stores the administrative information of each revised post.

With that script you only delete all the post revisions, but it doesn’t delete the administrative information.

I found a plugin that provides a simple an easy solution that with couple of clicks you can get your database clean.

Better Delete Revision

Better Delete Revision is the best plugin you can use to delete all the revisions of the database. It deletes not only the post but also all the meta information of each post. It’s really simple to use, with a couple of clicks you can clean up your database.

Revision Control

In case you don’t want to delete all the revisions, but only some of them or manage some older versions you can always use Revision Control to manage the revisions of your post manually.


I didn’t include WP-Optimize in the initial post because it does more than just delete WordPress revisions, but after Allie’s comment I decided to include it in the post. This plugin do a lot of different type of optimizations in the database including deleting revisions without the need of using phpMyAdmin.

Be careful

Remember every time you try to do something with your database that you need to backup all the database first. You never know when things go wrong. I’ll be writing a new post in the future how you can backup your blog in many different ways.

Share This Content
Subscribe to Updates
Delivered by Feedburner
Subscribe via RSS.
3 Responses
  1. Ricardo,

    I forgot all about clearing out old revisions that are not necessary anymore. I use WP-Optimize, do you think that one does a good job? I’m not sure of everything it does but it came highly recommended so I grabbed it.

    Thanks for your insight.


    • Ricardo says:

      WP-Optimize is a great plugin. It does more than just delete revisions and is simple to use. I’ll include it in this list.
      Thank you for your comment.

  2. Naren P says:

    i’ve used so many plugins to optimize my wordpress database. But WP-optimize plugin does the job well more than just delete revisions and also speed up my site speed in between. Must have plugin for every wordpress site. Thanks for this indepth article. I learned something useful

What do you think?

We are small company that provides a full range of WordPress and digital marketing services to business around the world.

Join our newsletter!
Receive FREE tutorials when you sign up to our Wordpress newsletter.