Best Guide on WordPress Database Optimization

WordPress uses PHP scripting and MySQL for the Database. Whatever hosting you bought, the company offers you MySQL database. Sometimes, you need to troubleshoot problems using the database. Thus, it is important to learn how you can do certain tasks on your WordPress database. This guide can help you troubleshoot some common WordPress issues to recover your website and make your website more secure.

Updating website regularly creates too many queries in the database. Thus, it becomes bulky and affects site performance. This is why WordPress database optimization is so important.

Removing unnecessary data can improve the efficiency of your database and make your web pages load quicker. This can be done by Database Optimization.

So, How to optimize WordPress Database?

WordPress databases can be managed using phpMyAdmin. phpMyAdmin is an open source web application with a nice easy graphical user interface.

To access your database using phpMyAdmin you need to open your cPanel. Then open phpMyAdmin option under DATABASES. This will open a new window in the browser.

Access phpMyAdmin from cPanel
Access phpMyAdmin from cPanel

On the left side of phpMyAdmin, you’ll see a list of databases. Select your database from the list. Have a look at ‘Overhead‘ on the right side of the list. If you see the numerical value, those tables can be optimized.

Overhead is temporary disk space that is used by your database to store queries. Over time, a table’s overhead will increase. Optimizing your database will remove the overhead and reduce the overall size of your database.

Select and check the table you wanna optimize and click on ‘With Selected‘  drop-down menu at the bottom of the tables and select Optimize table. Once the process is done, the page will show you the message of success.

Optimize database using phpMyAdmin
Optimize database using phpMyAdmin

If you wanna get rid of all these technical stuff, you can simply Advance DataBase cleaner plugin.

Advance Database Cleaner:

The plugin clean database by deleting orphaned data such as ‘old revisions’, ‘old drafts’, optimize database and more.


  • Delete old revisions of posts and pages
  • Delete old drafts of posts and pages
  • Delete old auto drafts
  • Delete spam comments
  • You can choose what items to clean-up
  • You can schedule your database clean up to run automatically
  • Optimize database and improve website speed

Below I will describe how to install the plugin and get it working.

For Single Site:

  • After extraction, upload the Plugin to your /wp-content/plugins/ directory
  • Go to Dashboard >> Plugins and choose Activate
  • The plugin page can be accessed at Dashboard » Tools >> WP DB Cleaner or via the left menu WP DB Cleaner

Advanced Database Cleaner
Advanced Database Cleaner

For Multisite:

Login to your primary site and go to My Sites >> Network Admin >> Plugins

  • Install the plugin as usual for multisite
  • Network activate the plugin

NOTE: Only the main site can have access to the plugin


I hope this guide on WordPress Database optimization offers great advice on how to optimize your database using phpMyAdmin and Advance Database Cleaner.

You would like to read my guide on how to duplicate WordPress database using phpMyAdmin

Is this guide helpful? Let me know in the comment section below and feel free to ask you get any complications while optimization.

Comment Policy: Your words are your own, so be nice and helpful if you can. Please, only use your real name and limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.


Please enter your comment!
Please enter your name here



Start WordPress Blog: Ultimate Guide For Beginners

Here is our step by step guide for beginners to start a WordPress blog.

Top 6 Best WordPress Theme Frameworks

There are many websites themes which are created by using a framework. Likewise, WordPress Theme frameworks also becoming so popular. The framework allows you...

The Most Essential WordPress Plugins

Here, I have listed some excellent plugins which will surely add more features and new functionality to your WordPress blog.

Tips to Speed Up WordPress Performance

Here, I am sharing some tips to speed up WordPress performance. All you need to modify .htaccess file on your server and add some plugins.

The Ultimate Guide to Harden WordPress Security

Learn how to improve WordPress security. Here are some basic security concepts that will help you to harden WordPress security.

How to Setup CloudFlare Free SSL for WordPress Blog

Google has announced that they will count HTTPS as a ranking factor which means if you using HTTPS you will get a higher position...


Get almost 100% PageSpeed on Newspaper theme

The newspaper theme is the most popular premium theme for a self-hosted WordPress blog. The theme is developed by team tagDiv. You...

How to Delete Multiple Images in WordPress Media Gallery

Hey, guys today one of my friends asked me a question, How can I delete Multiple Images in WordPress? I replied, "It's very simple." Yeah,...

How To Reduce Admin-Ajax Server Load In WordPress

To increase better user experience, we always end up by increasing site speed. After clicking a website link seems like a simple...

How to Remove jQuery Migrate in WordPress?

jQuery Migrate greatly simplifies the process of moving older jQuery code to a higher jQuery version by identifying deprecated features. It then restores deprecated...

How to create News Sitemap for WordPress site?

Learn how to create special news sitemap for your WordPress blog/ website using Yoast News SEO plugin and Jetpack plugin.