How to repair WordPress Database automatically
Have you ever encountered with a broken database. Or else something like corrupted. Or some errors expressing you have issues in your database like. You are in the right place to recover your website.
WordPress allowing us to repair database automatically. To allow WordPress repair page to automatically repair database problems, please add the following line to your
wp-config.php file. Add it just before
/*That’s all, stop editing! Happy blogging*\
define('WP_ALLOW_REPAIR', true); /*That’s all, stop editing! Happy blogging*\ line in wp-config.php.
Once you have done that, you can see the settings by visiting this page:
yoursite.com with your actual domain name with the correct extension. Otherwise you’re in a trouble again.
Once you access the path will see the same as showing in the image.
Two options to repair database in WordPress
Load the related page will show you two options to select.
- Repair database
- Repair and Optimize database
If you only need to repair database, just click on Repair Database. Otherwise if you willing to repair and optimize the database, go for second choice.
This will solve your database issues.
If above guide unable to solve the issues you can repair database via phpMyAdmin.
Repair database with phpMyAdmin
To do this with phpMyAdmin, first go to phpMyAdmin and select the database you want to repair. Then select all the tables. Then select
Repair Table under
Table Maintenance from the
With selected: dropdown.
This will repair your database automatically against broken, corrupted or other errors encountered WordPress database.
That is all from this tutorial regarding how to repair WordPress Database automatically. Hope you enjoyed the tutorial. Happy learning ahead. Thanks for reading.
Recommended: Please follow our step by step guide how to create a WordPress Theme from scratch. You’ll be able to create your own theme at the end of these lessons.