What you're seeing
Your WordPress site has been replaced by a single line: Error establishing a database connection. Nothing else, no menu, no content, and the admin area at wp-admin is usually down too.
It looks catastrophic, and it is genuinely alarming the first time. The reassurance: your content is almost certainly fine. WordPress keeps your posts, pages, and settings in a database, and this message means WordPress cannot talk to that database right now, not that anything has been lost. It is a broken connection, not a broken site.
What causes it
- The database is temporarily overloaded, often a brief traffic spike or a resource limit reached on the account. These frequently clear on their own.
- The database server needs a moment, a transient hiccup that resolves in minutes.
- Corrupted database tables, occasionally after a crash or a failed update.
- Changed database login details in the site's configuration, which is where things get technical and where we take over.
What you can safely try yourself
- Wait five minutes and reload. This is not a joke, it is the actual fix a surprising amount of the time. If the cause was a passing overload or a momentary hiccup, the site comes back on its own. Grab a coffee and refresh.
- Check whether it is every page or just one. Try your homepage and wp-admin both. If most of the site works and only one area fails, the problem is narrower than this message suggests, and worth mentioning to us.
- Check it is not just you. Use downforeveryoneorjustme.com to confirm the site is genuinely down for everyone and not a local network glitch on your side.
- Think about what changed just before it started. A plugin or theme update, an edit to a settings file, a sudden surge of visitors? Whatever changed last is usually the culprit, and knowing it helps us fix it fast.
That is as far as the safe DIY steps go, and deliberately so. Everything beyond this point, checking and correcting the database connection details in your site's configuration file, repairing database tables, examining the database server, involves editing core files or the database directly, where a small mistake turns one broken thing into several.
When to hand it to us
If waiting has not brought it back and nothing obvious explains it, open a support ticket. Tell us your domain, roughly when it started, and anything that changed just before. We can see the things you cannot from the front end, the database server, the account's resource usage, the configuration, and the error logs, and this is squarely the kind of thing our support handles rather than something you should be editing config files to chase.
Our staff are here for exactly this. You will not reach a call centre reading from a script, you will reach someone who can look at your actual site and sort it out.
Good to know
This error, more than most, is why your own backups matter, not because you will usually need one to fix it, but because on the rare occasion the database itself is damaged, a recent backup turns a serious problem into a quick restore. Our article on backups covers your options. And if the cause turns out to be an overloaded account rather than a one-off spike, it may be a sign your site has outgrown its plan, which our article on upgrading your hosting covers, better to know than to keep meeting this screen.