Enable Database Repair / Optimization in WordPress

If you want to enable database repair and/or optimization in WordPress, you have to add this to your wp-config.php:

define('WP_ALLOW_REPAIR', true);

After adding the line of code to your WordPress configuration file, you can browse to example.com/wp-admin/maint/repair.php to optimize or repair your WordPress database.

After you finished your database optimization, you should remove the WP_ALLOW_REPAIR entry from your wp-config.php, to avoid misuse of the optimization tools.