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.
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.
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.
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.