WP-Optimize Plugin to Optimize WordPress Database Easily and Safely

Let’s talk, how you can Optimize WordPress Database of your blog. Optimizing database will keep your blog speedy and smooth in terms of loading time and speed. Before I start, you should know basic things such as how WordPress database works and why you should really worry about WordPress database optimization?

Updated on

Learn how to Optimize WordPress Database Easily and Safely using WP-Optimize Plugin. In recent time, the internet has changed a lot. Now everyone wants a faster loading website. And when I say everyone – it includes both humans and search engines.

In this article, I am going to tell you that how you can Optimize WordPress Database of your WordPress website to keep your website speedy and healthy?

Fastest WordPress Hosting Anywhere!

Before we start, let me ask you a few things. Do you know,

What is WordPress Database?

Why should you be really concern about WordPress Database Optimization? and

How does Optimizing WordPress database help a WordPress site?

If you know the answers to these, you may skip the following sections explaining the basics of WordPress database and jump to the implementation part. Otherwise, continue reading, it is not going to take much of your time.

How to Optimize WordPress Database using WP-Optimize plugin
How to Optimize WordPress Database using WP-Optimize plugin

What is WordPress Database?

WordPress database stores the content of website or blog. The data is stored in WordPress Database in the form of tables. And these tables are called WordPress Database Tables. WordPress uses MySQL data management system for creation and storage of data in the form of database tables.

WordPress database stores:

  • Blog posts, page content, comments and
  • Other forms of content i.e. team, portfolio data, deleted items which are sent to trash etc.
  • Core WordPress settings i.e. your webpage settings, blog settings, plugin settings and of course theme settings as well.
  • WordPress database also stores post revisions (autosave and manually), auto draft posts, posts in trash etc. This unwanted data occupies disk space on your hosting. However, this kind of data does not remain very useful for you, once the final post is published.

Why You Should Optimize WordPress Database?

Over the time many useless pieces of files (residual data) accumulate in your WordPress database. And if you do not optimize and clean up your WordPress database, this residual data may become really large in size. This residual data causes slowing down your website, hence badly affect overall response of your site.

In general, the process of cleaning up this unwanted residual data is called database optimization.

The large size of WordPress database might be one of the main reasons for bad response time and slow page loading speed of your site.

Therefore, in order to keep your WordPress website fast and healthy, you must optimize WordPress database on regular basis.

Optimize WordPress Database using WP-Optimize

You can easily optimize WordPress database by using WP-Optimize plugin. The best thing about this WordPress database plugin is that it offers One-Click solution for WordPress Database Optimization.

It also calculates and shows your database size and how much disk space you have saved so far, using WP-optimize plugin.

How to Use WP-Optimize Plugin (Step by step instructions with screenshots)

  • Install and activate WP-Optimize plugin.
  • Go to WP Dashboard > WP-Optimize.
  • For multiple optimizations with a single click, select the options for optimization. Or you may optimize one by one, by clicking Run Optimization button next to each option.
  • Click Run all selected optimizations. Optimization process takes a while depending upon the size of the database. Upon completion of the process, it shows status and results of optimization.


Optimizations Covered by WP-Optimize plugin

  • Optimize database tables: Don’t forget to check this option. By checking this box you are allowing WP-Optimize to optimize WordPress database and its tables to keep them in order to work properly.

Cleanup and Removal Options

  • Clean all post revisions: When you make changes in a post, WordPress keeps an older version of that post. So that you can restore that older version anytime. Let’s say you updated a post 5 times then WordPress will keep 5 versions of the same post. However, these older versions are not at all useful for you. Because you are only concerned about the latest version of the post which you have updated last time. So it’s better to remove all other older post revisions
  • Remove spam and trashed comments: Ahha! If your WordPress blog is bit older and performing well. Then you must be facing a lot of spam comments. WP-Optimize allows you to delete spam comments as well as comments in the trash.
  • Remove all auto drafts: Auto draft also does same as a post revision. When you write a post, WordPress autosaves your post after a fixed time. This is certainly a useful feature. In case something went wrong, you won’t lose all your post. But over the time these auto drafts increase the size of your WordPress database. So you should consider removing them.
  • Clean all trashed posts: When you delete a post, it moves to the trash folder. And to delete it permanently you need to clean trash of your WordPress site. Once you decided to delete a post there is no point of keeping it in the trash. Better you check the corresponding box to delete stuff in the trash.
  • Remove unapproved comments: If you are sure that comments pending for moderation are spam. You can directly delete them by checking the box on WP-Optimize dashboard.

Items involve intensive database operations

  • Remove expired transients options, Remove pingbacks, Remove trackbacks, Clean post meta data, Clean comment meta data, Clean orphaned relationship data: These database optimizations require little more attention than others. As the plugin author also mentioned in plugin notes that ‘These items perform more intensive database operations. In very rare cases, if your database server happened to crash or forcibly shut down at the same time as an optimization operation was running, data might be corrupted. Therefore you should take a backup before optimizing.

Try it yourself

Run all selected optimizations WP-Optimize
Run all selected optimizations WP-Optimize

As I mentioned above checkboxes for optimizations which you wish to run. And then hit Run all selected optimizations button to start optimization.

Database Optimization process took some time depending upon the size of the database.

When optimization completed it shows the statistics of the optimization as shown in the image below.

Wp-Optimize Selected Optimization Results
Wp-Optimize Selected Optimization Results

Wrapping Up

WordPress Database Optimization is important to keep your WordPress site healthy and snappy fast. Cleaning up WordPress database also helpful when you are migrating your WordPress as it reduces the size of database by removing unwanted data.

I hope this guide helps you to optimize WordPress database using WP-Optimize plugin. Which other plugin or method you use to optimize WordPress database, feel free to share with our readers. Or if you have a query about this subject, post that via comment section below. I will be happy to help.


Do you know? How to
Optimize Image in WordPress for Pagespeed
Optimize WordPress Robots.txt file for SEO
Increase Page Speed using Htaccess (WordPress)

Photo of author
Shashank Singh
Shashank is a web addict and amateur blogger. His current interests include blogging, SEO, and WordPress. See his social profiles to know him even better.
Disclaimer: Affiliate links of some product(s) are being used on this page, if you follow the link and make a purchase, we may receive compensation from respective companies. This compensation comes at no additional cost to you.

3 thoughts on “WP-Optimize Plugin to Optimize WordPress Database Easily and Safely”

  1. Avatar of Cyril

    Thank you sir. Your tutorial helped me to optimize my website database.
    God bless you.

    • Avatar of Shashank Singh

      Hey Cyril,

      Glad that I could help.
      Thanks for stopping by!

  2. Avatar of Surjo Vai

    You can also try lscache plugin for wp optimization.


Leave a Comment

Your email address and website details will not be published. Required fields are marked with *.