Error establishing a database connections

  • Answered
I tried to view my website last night and received the Database Error. I am not sure when it started because it has been at least a few days since I had viewed the site. How do I fix it?
Hello KristenH, Normally, when encountering the Error establishing a database connection you will want to visit the wp-config.php file and find the database connection credentials. Make sure these match your database name, username, and password you have in your cPanel. This usually will fix the issue. Your case was a bit different in that it was due to a corrupted table within your database. This was discovered by trying to visit your wp-admin page. It presented a message stating there may be a corrupt database table. Although it gives a fix there, you can check and repair the database tables directly from your cPanel account. After performing this, the site now shows up as it should. Best Regards, Scott M