Cleaning up WordPress Revisions with Revision Cleaner

Last week I showed you how to control the number of revisions that are saved for each post using the Revision Control plug-in.

That stops too many revisions being saved in the futures, but I suspect that most of you reading this will already have a blog running, and will therefore have quite a number of revisions already in the site’s database.  Since the database is searched every time a post is displayed, it makes sense to remove these revisions as well so as not to slow down the time it takes to retrieve the post.

For this task there is a plug-in called Revision Cleaner, that allows you to remove all of the revisions on post that have been published for longer than a certain number of days.

Revision Cleaner is in the WordPress repository, so it can be installed from an administrator’s account:

Revision Cleaner in the WordPress repositoryOnce activated, it is possible to set the global values for the clean-up operation, or let each user decide how long to leave the revisions in place for.

The multi-user settingThe clean-up threshold is set in days and hours.

Setting the numbers of days and hoursRevisions on draft posts and not affected, as long as this box remains ticked.

Always keep draft revisionsWith both plug-ins in place, the database should not grow too fast, as the drafts will have their revisions limited by Revision Control, and once published Revision Cleaner will take care of the rest.

 

About Graham Tappenden

Graham Tappenden is a blogger from Germany. He has written code for WordPress themes since 2006 and been creating websites since 1994.
This entry was posted in Plug-ins and tagged , , . Bookmark the permalink.