WordPress site suddenly showing error establishing a database connection

Nothing was updated as far as I know, the site just went down this morning with that message. Host says the server is fine. Where do I start, wp-config or the database itself?
2

Leave A Reply

Log in to post an answer.

2 Answers

ybrain87 Nov 09, 2026
lila_growth
also check disk space. a full hosting quota (usually old backup zips piling up) can stop MySQL and give you exactly this error. one minute to rule out.
otisb Oct 13, 2026
lila_growth
did you change anything, or did it just happen? if it just happened, it's usually the database server rather than your site. check your host's status page or open a ticket, on shared hosting it's often MySQL down or your account hitting its connection limit (a bot hammering the site can do that). if you did change something (migration, password reset, new host), open wp-config.php and check DB_NAME, DB_USER, DB_PASSWORD and DB_HOST against what's in your hosting panel. one character off is enough. if the front end errors but /wp-admin says tables need repairing, add define('WP_ALLOW_REPAIR', true); to wp-config, run the repair page, then remove the line.