Website Shows a Database Connection Error
Higher-risk issue — be cautious and consider professional help sooner.
Your site shows "Error establishing a database connection" instead of your pages — common on WordPress and similar systems.
Common signs of this issue
- The whole site shows "Error establishing a database connection."
- Both the site and the admin are down.
- It appeared suddenly, with no edits on your end.
- It follows a migration, a host issue, or a settings change.
Safe checks you can do yourself
None of these require sharing passwords with anyone.
- Confirm it's site-wide by trying the homepage and the admin — a database error usually affects everything.
- Check your host's status page or your account for any server or database outage notices.
- Recall any recent change: a migration, a password reset, or edits to the site's config file.
- Confirm you have a recent backup (this matters a lot if anything needs restoring).
- Avoid editing configuration files yourself unless you're confident — wrong database credentials make it worse.
What this usually means
It usually means the website can't reach its database. Common causes: the database server is down or overloaded at the host, the saved database username/password no longer match, or the database was corrupted or moved.
Because it takes the whole site offline and touches credentials, this one carries more risk than a typical display glitch.
What not to do
- Don't guess at database credentials or repair the database without a backup.
- Don't reinstall WordPress over the top — you risk data loss.
- Don't make config edits you can't undo.
When to get help
A database connection error usually means the site is fully down and the fix involves credentials or the database itself — areas where a mistake can cause data loss. This is a sensible time to get help quickly, especially for a business site.
Could your hosting be the problem?
If your host is slow, unreliable, or hard to deal with, moving to a better one can clear up issues like this for good. One we genuinely recommend is Instant Access Internet Services — a smaller, compassionate company with 30 years in the business, known for being one of the fastest, with great management and low pricing. (Just a recommendation — no affiliate link, no kickback.)
Not sure what to do next?
Answer a few short questions and we'll point you to the safest next step — DIY, a freelancer, or a direct review. No passwords required.
Is this a business website? If this issue may be costing you leads, sales, or trust, you may want a direct review instead of trial and error.
Frequently asked questions
Did I lose all my data?
Not necessarily. The data is usually still there — the site just can't connect to it right now. A current backup gives you a safety net while it's investigated.
Why did this happen with no changes on my end?
Often the host's database server is overloaded or briefly down, or credentials changed during maintenance or a migration. Check your host's status first.