InfoPhilic WordPress Best Guide on WordPress Database Optimization

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.

Amit Malewar
Amit Malewar has been the tutorial writer since 2013. His passion for helping people in all aspects of technology flow through the expert coverage he provides. In addition to writing for InfoPhilic, Amit loves to read and try new things.

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



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 can buy...

How to Remove jQuery Migrate in WordPress?

Learn how to remove jQuery Migrate from your WordPress site.

WP Super Cache Plugin: Best Settings & Configuration Guide

A cache plugin serves static contents to the visitor, which improves page load speed. There are so many cache plugins available in the WordPress plugin...

How to configure WP-Rocket plugin for WordPress site

When it comes to optimizing your website, the role of caching in WordPress can never be underestimated. What exactly is caching all about? We know...

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,...