Home / Wordpress / Tips And Tricks / Fix WordPress Database Via wp-config.php File

Fix WordPress Database Via wp-config.php File

Fix WordPress Database Via wp-config.php File

Fix WordPress Database Via wp-config.php File

You are having problems with the database of WordPress and are struggling to find a way to fix it? In the previous article, I’ve guided you how to fix the database through phpMyAdmin. However, what if you don’t have access to phpMyAdmin or do not dare to “risky” operation on it for fear of inadvertently incurring more other errors? If so, this article is for you. Immediately after this, I will show you how to repair the database with the available WordPress’s feature via the wp-config.php file.

Read more:
? Fix WordPress Database With phpMyAdmin
? How to Choose the Best WordPress Hosting?

Fix WordPress Database Via wp-config.php File

1. First, you need to open the wp-config.php file, find the line:

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

Add the following code above it and save:

define('WP_ALLOW_REPAIR', true);

2. Access to the path http://yourdomain/wp-admin/maint/repair.php.

3. Click Repair Database if you want to fix it. Click Repair and Optimize Database if you want to simultaneously repair and optimize database.

Fix WordPress Database Via wp-config.php File

Note: the database optimization process can not take place if your hosting does not support optimization.

4. Wait a moment for the WordPress database repair process is complete, you will receive a notification that looks like this.

Fix WordPress Database Via wp-config.php File

5. Open the wp-config.php file and remove the code added in step 1. You must do this if you don’t want other people also can conduct the repair or optimize database without your consent.

It’s simple and fast right? I wish you success! ?

Fix WordPress Database Via wp-config.php File

Have you ever used this feature to fix the database WordPress before? What do you think about this feature? Let us know your opinion in the comment box below.

If you like this article, please subscribe to my website to regularly update the best, the latest posts by email. Thank you very much. ?

Subscribe to Hippo Review via Email

Enter your email address to subscribe to Hippo Review and receive notifications of new posts by email.

Check Also

Create email with your own domain on hosting using cPanel

Create Email With Your Own Domain On Hosting Using cPanel

Create Email With Your Own Domain On Hosting Using cPanel Recently, there are many people …

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected!