Cleanup Your WordPress Database with WP-Optimize

I'm a big fan of the WordPress post revision system. They ensure that most of your work is not lost when a technical problem arises.

Last month I spoke about revisions in my post “A Reminder of Why WordPress Revisions are So Important“. In the article, I recommended limiting post revisions to two or three drafts in order to keep the size of your database manageable.

You can limit the number of post revisions your WordPress database stores by adding the following code to your wp-config.php file:

define( 'WP_POST_REVISIONS', X );

* Change X to the number of revisions you want to store.

A good way of managing the size of your database is to install an optimisation plugin. I recently installed WP-Optimize on the Rise Forums Blog. It's a fantastic plugin that allows you to remove excess post revisions, auto draft posts and spam comments. You can also remove pingbacks, trackbacks and transient options (temporary WordPress data).

WP Optimize Optimisation Settings

It displays a list of all of your database tables. The size of each table row is displayed and it advises whether the table row has been optimised yet.

WP Optimize Table Report

The bottom of the page lists the current size of the database and how much can be saved by optimising.

WP Optimize Database Size

Whenever you optimise your database, the plugin shows you a summary of what was cleaned up. This includes details of what was deleted and how much space you have saved.

WP Optimize Optimisation Results

WP Optimize has some good automation settings that will optimise your database in the background. You can set for data older than a set number of weeks to be automatically deleted (2, 4, 6, 8 and 10 weeks can be selected).

You can also schedule a clean up every 7, 14 or 31 days. The clean up will remove data that you specify you do not need. For example, you can set it up so that auto revisions are deleted but auto drafts are saved.

WP Optimize General Settings

WP-Optimize is one of the best optimisation plugins I have come across so far. It is very simple to use and will greatly reduce the weight of your WordPress database. The plugin is also free to download so I recommend trying it out and seeing how much space it can save for you :)

Thanks,
Kevin

I am an experienced blogger who has been working on the internet since 2000. On this blog, I talk about WordPress, internet marketing, YouTube, technology and travelling.
Share This