fbpx

How to repair WordPress Database

This article will show you how to repair a WordPress database using WP_ALLOW_REPAIR. This will instruct WordPress to fix any issue by adding a line in your wp-config.php file.

Firstly, you need to open your wp-config.php file. It can normally be found in the root folder for your domain.

Once open, look for the following line:

/* That's all, stop editing! Happy blogging. */

Add this line immediately above that line:

define ('WP_ALLOW_REPAIR', true);

Now, save your wp-config.php file and close it.

Now go to http://yourdomain.com/wp-admin/maint/repair.php. This will take you to the database repair page where you’ll be able to repair the database, or repair and optimize the database. Click on your preferred option and wait for WordPress to finish the process.

Database repair page

Once you’re finished, remove the line that you just added to your wp-config.php file. This page is not password protected.


If you are a Host Duplex customer and still have questions, please open a ticket in the Host Duplex client portal.

Updated on December 29, 2021

Was this article helpful?

Related Articles

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.