If you are running a WordPress website and want to improve your website performance, database optimization could be an excellent way to do that. WordPress saves all the website data in database tables. As your website grows, your database continues to save a lot of redundant data too. Removing all this data will keep your database healthy and make your website super-fast.
WP-Optimize WordPress Plugin is an excellent free WordPress plugin for database cleaning and performance optimization. Though the plugin works with the database, it doesn’t need access to the database or the PhpMyAdmin.
Getting Started
Once you install and activate the plugin on your website, it will create a new menu item titled ‘WP-Optimize’ in your website dashboard. Clicking on that menu will take you to a page like the following –

As you see, the ‘Clean-up Options’ section provides a handful of options. Let me go through the available options one-by-one.
Available Options
Post Revisions – When you edit or update a WordPress post, a copy of the old post is also saved in the database. Therefore, if you edit a post 50 times, 50 versions of this post are saved in the database. This happens with all of your posts. Make sure that you don’t need the revisions anymore and then clean the post revisions.
Auto-draft Posts – Like the post revisions, WordPress also saves copies of your post while you are writing them. This also increases the database size. You can safely delete the auto-drafts every once in a while.
Spam Comments – If you use any spam detector plugin, then you will have some spam comments in your website. This option lets you delete all the comments that are marked as spam.
Unapproved Comment – By using this feature, you can remove all unapproved comments at once.
The last three options are intended for advanced users only. We will skip them in this tutorial.
In the ‘Actions’ section, database tables optimization makes sure that your database is not using large amount of space.
After making all the changes, click the big ‘Process’ button. This will take care of the issues you selected and will show a report once cleaning is done.

Database Tables
If you want to view the current condition of your database tables, click the ‘TABLES’ link from the top section. This will show you a complete list of all the tables along with their sizes and whether they need optimization or not.
Setting up WP-Optimize
Click the ‘SETTINGS’ link to go the configuration section of WP-Optimize. In that page, you will find two settings sections – General Settings and Auto Clean-up Settings.

From the general settings, you can choose to keep the data for a specific number of weeks, enable admin bar link for the plugin, disable or enable comments and trackbacks in your posts.
The auto clean-up settings section includes options to enable a scheduled cleanup and then set up the cleanup frequency. You can also choose which tasks should be performed in the auto clean-up. Available options include removing auto revisions, auto drafts, spam comments, unapproved comments, optimizing database, enabling email notifications, etc.
After making the necessary changes, don’t forget to click the ‘Save Settings’ button.
Final Words
As you can see, using the WP-Optimize plugin is very simple. It takes care of some very specific issues and does the job perfectly.
Let me know your experience after using the plugin. And if you are using any other plugin to optimize the database, let us know about that plugin by leaving a comment below.