Optimize wordpress database

Hi guyz, today I will discuss one of the very important thing wordpress site owners want, optimize database. There are so optimize wordpress database many plugins and tips to repair or optimize wordpress database but wordpress itself has a very easy solution for this situation, which automatically optimize the database. It optimizes database on a regular basis. Some simple steps would make your database optimized:

Step 1: Open URL {$your_site}/wp-admin/maint/repair.php, if you see message,

“To allow use of this page to automatically repair database problems, please add the following line to your wp-config.php file. Once this line is added to your config, reload this page.

define(‘WP_ALLOW_REPAIR’, true);”

follow the Step 2 otherwise running this file would optimize wordpress database and you don’t need to follow Step 2 as it is already defined somewhere in the script.

Step 2: Open wp-config.php file stored in root of wordpress directory, add below code somewhere in the file:

define(‘WP_ALLOW_REPAIR’,  true);

After adding this code run the URL {$your_site}/wp-admin/maint/repair.php and your database is repaired.


Note: You don’t need to be logged in to perform this action. You might be facing login issues since your database is needs a repair so enabling this feature would just repair your database without any authrntication.


“I am PHP Freelancer having more than 7 years of experience, if you want to do any project with me then you can contact me.”

Be Social, Share!