Here is a lightweight WordPress plugin that enables you to optimize and repair InnoDB and MyISAM database tables. It uses WordPress’ built-in database optimization tools to get the job done. There are lots of great database optimization plugins out there, but this one is aimed specifically at easily optimizing and repairing InnoDB tables. Although it also works on other types of tables, such as MyISAM.
I want to optimize and repair InnoDB tables
Using database management tools such as phpMyAdmin, it is easy to optimize and repair MyISAM database tables. Just select your tables and click “repair”. For database tables of the InnoDB type, however, it is not possible to optimize and repair using phpMyAdmin and/or similar tools. If you try, you’ll get an error that looks like this:
“The storage engine for the table doesn’t support repair.”
Of course, maintaining a well-optimized database helps to improve site performance. So it’s kind of a pain that it’s not possible to optimize/repair InnoDB-type tables using tools like phpMyAdmin. Fortunately, WordPress provides some simple database-optimization tools that can do the job. Here is a screenshot:
To enable these repair and optimization tools, you need to add a line to your site’s
..and then access the tools via your browser at the following URL:
The tool is simple and effective, but it can be a bit of a chore to edit
wp-config.php whenever you want to optimize or repair your database. So I created a quick plugin to do the job:
WP Plugin - Enable WP Database Tools – Version 1.0 (1 KB zip)
What this plugin does:
- Enables the database tools by setting the
- Adds a widget to the Admin Dashboard that contains a link to the database tools page
And that is it. No fuss, no muss. Very straightforward, lightweight and simple. Just upload, activate, and optimize/repair your database tables. When you are done, you can delete the plugin or simply deactivate it until next use. Really saves some time for those of us who like to run a tight ship with optimized database tables :)
Important: Remember to deactivate the plugin when not in use!
You can learn more about using WP’s built-in tool to optimize and repair database tables over at WP-Mix.com.