2 Steps to Fix the Error Establishing a Database Connection in WordPress – WordPress Tips

By | April 18, 2019

WordPress may can’t connect database and faild to display anythig, in this tutorial, we discuss two main reasons that cause this problem and provide solutions, you can fix this problem by our steps.

How to fix?

Step 1. Check the WordPress configures on database connection in config.php is correct

Open config.php file in website root path, check code below:

Step 2: If your wordpress configure is correct, check the database host is available or not.

If the database host is not available, you can not connect it.

You also can use follow code to check why wordpress can not connect database.

Leave a Reply

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