How would you debug and fix a WordPress website that is experiencing the “Error Establishing a Database Connection” message?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our W3Make Forum to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
you can try doing following action to resolve your issue.
1. While configuring WordPress for installation it asks for database credentials like database name, username, password, database host and table prefix. make sure all the credentials are correct and the given database exists.
2. If you are using some hosting service ensure your database server is running and you can access it.
3. Check your php.ini file and confirm your desired database driver is enabled or
run the following code:
and check for the enabled database driver.
4. in case of hosting service user sometimes the service provider can give database host value to something other than localhost confirm with your hosting service provider if its correct or not.
5. temporarily disable plugin to check if the plugins are causing the issue.