Use code PERFMATTERS for an extra 10% off!
  1. Home
  2. Docs
  3. General
  4. How to optimize WordPress database tables

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 on the “Tools” submenu.

Perfmatters tools submenu
Perfmatters tools submenu

Step 3

Click on the “Database” submenu.

Perfmatters Database
Perfmatters Database

Step 4

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 5

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 let you know 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