How to Delete WordPress Revisions

how to delete wordpress revisionsWhen you own a small website keeping keeping tuned is not something people worry, we can’t say the same about running a website that’s has periodic updates, has hundreds of post and that was been online for few years. Your website starts eating more resources and the server suffers from it.

One thing about running a WordPress website (or any other website) is that you should be running periodic backups, specially before making any changes. You never know when you are going to mess things up. That backup can help you restore your website quickly and save you from some headaches.

Creating periodic backups and moving the database around can become annoying. The database can increase in size fairly quick specially if you have been adding content to your website. The things is when you are adding content to your website and writing pages and post, WordPress starts adding revisions of each post to the database, this revisions can increase the database size considerably.

WordPress Revisions

In WordPress 2.6  introduced as “WordPress revision”, this feature 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.

WP-Optimize

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 the whole database first. You never know when things can go wrong. I’ll be writing a new post in the future how you can backup your blog in many different ways.

3 comments on “How to Delete WordPress Revisions

  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.

    ~Allie

    • 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

Write a Reply or Comment

Your email address will not be published. Required fields are marked *