Tuesday, 21 May 2013

Delete Old Post Revision In WordPress

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.
Post Revisions are a feature introduced in WordPress 2.6. Whenever you or WordPress saves or drafts a post or a page, a revision of that version is automatically stored in your database. Each revision will slowly increase the size of your database. WordPress.com will store the last 25 revisions for each post.

For example, if you have 1 post and it has 10 revisions you could be storing up to 10 copies of older or unused data in your database, which will increase the size of your database for sure. You can learn more about Post Revisions by clicking here.

Now we know that these useless post revisions are just wasting our space. You can't delete these revisions manually, but the oldest revision is automatically deleted if there are more than 25 revisions.

Delete Post Revisions:

Delete Post Revisions is a great plugin to delete all useless post revisions off your database. It is compatible with the latest version of WordPress (3.x). It's coded by me, so don't forget to rate this plugin.

Here is the original description of Delete Post Revisions:

We created a tool which helps you to remove useless post revisions from your database.

Installing Delete Post Revisions:

  • Click here and download this plugin. Visit your WordPress' plugin page and install this plugin.
  • You can also install this plugin from your WP's plugin directory.
  • After installing, just click on active.

After installing, a new option will appear under the Settings tab. Not here is how to delete old post revisions:

  • Visit Settings > Delete Post Revisions
  • In the bottom, click on "Start" button and it's all done.

WordPress’ database queries don't retrieve revisions, so the number of revisions has no effect on the queries, but it's a great way of keeping your database clean. The only time the revisions are retrieved is on the edit page of the individual post.
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
 
Powered by Blogger.