How to Optimize WordPress database, clean all post revisions, unapproved comments and more….

Its very important to optimize your wordpress database to improve the performance of overall wordpress usage. Over the period of time while you are writing and saving articles, there are revisions of the articles created automatically by wordpress. Post revisions will help you go back to the previous version of the article. There could be SPAM / unapproved comments which you would like remove. All of the wordpress optimizations can be done by the press of a button. For this we will be using WP-Optimize Plugin. For this you need to first Install WordPress Plugin -> Activate the Plugin and then using the Plugin we are going to run the optimizations. Please note that this blog post is not sponsered. I am sharing the information out of my personal experience with this wordpress plugin.

Install WP-Optimize Plugin

To Install a WordPress plugin, On the WordPress dashboard click on Plugins -> Click on Add New. Search for WP optimize. Its a free WordPress Plugin with a premium upgrade option. Premium upgrade provides multisite support, scheduling regular optimizations, Optimize individual database tables and more..

Some of the Plugin Features related to database optimizations are listed below:

  • Removes all unnecessary data (e.g. trashed/unapproved/spam comments, stale data) plus pingbacks, trackbacks and expired transient options
  • Compacts/de-fragment MySQL tables with a button-press
  • Detailed control of which optimizations you wish to carry out
  • Carries out automatic weekly (or otherwise) clean-ups
  • Retains a set number of weeks’ data during clean-ups
  • Performs optimizations without the need for running manual queries
  • Automatically trigger a pre-optimize backup via UpdraftPlus
  • Show database statistics and potential savings

Click on Activate to Activate this Plugin.

Once the plugin is activated, you will find WP-Optimize icon on your WordPress Dashboard panel. Click on the Icon and then click on Run all selected optimizations. You can leave the default selection as it is. You can also select each optimization separately and then click on Run Optimization button on the right hand side. I will go with running all the default checked optimizations and will be running it all together to save time.

Keep below Optimizations unchecked unless there are any database related issues or corruption in any table.

Optimizations Completed.

This plugin can perform more functions than just wordpress database optimizations like Minify CSS and Javascript, Image Compression, Page Cache, Preload to name a few. However, you can choose which options you want to use and keep the rest of its features in disabled state. Now, my site database tables are optimized which should save some storage space and speed up the site. I will recommend you to perform this regularly at least once per month to make sure to clear all the clutter.

Leave a Comment