Use the code PERFMATTERS for 10% off!

How to optimize WordPress database tables

MySQL has an OPTIMIZE TABLE command which can be used to reclaim unused space in a MySQL install. You can think of this kind of like defragging your hard drive. The Perfmatters table optimization feature runs the OPTIMIZE command on any tables in your WordPress site’s database that can be optimized.

Note: The OPTIMIZE command doesn’t run on InnoDB tables, as this isn’t needed and in fact can cause problems, such as rebuilding the entire table. This feature is primarily used for MyISAM tables. Some managed WordPress hosting providers, like Kinsta, convert your tables to InnoDB when you migrate over. This is for better performance. So this optimization feature is really suited for those running on shared hosts and with the older storage engine.

Optimize WordPress database tables

Follow the steps below on how to optimize your WordPress database tables.

Important: These functions make permanent changes that cannot be reverted! Back up your database before proceeding.

Step 1

Click into the Perfmatters plugin settings.

Perfmatters settings
Perfmatters settings

Step 2

Click the “Extras” tab and then click “Database.”

Perfmatters Database
Perfmatters Database

Step 3

Scroll down and toggle on “Tables.” The number of unoptimized tables found will show up to the right of it.

WordPress Database Tables
WordPress Database Tables

Step 4

Scroll down and click “Optimize Now.”

Perfmatters Optimize Now
Perfmatters Optimize Now

The process will run in the background. You don’t need to stay in the plugin while it’s running or worry about leaving the window open.

Perfmatters database optimization running
Perfmatters database optimization running

It will and let you when it’s finished with a notification at the top of the Perfmatters plugin settings.

Perfmatters database optimization complete
Perfmatters database optimization complete

Check out our documentation on WordPress database optimization for other easy ways to clean up your database with Perfmatters. You can also optimize your database tables on an automated schedule.

Was this article helpful?

Related Articles