"Error establishing a database connection" means WordPress can't reach the database that holds your pages, posts and settings. It's usually one of three things: the connection details in wp-config.php are wrong, the database server is down or overloaded, or a database table is corrupted.
1. Check the connection details
Open wp-config.php and compare DB_NAME, DB_USER, DB_PASSWORD and DB_HOST with the database shown in your hosting control panel. A password change or a site move is a common cause.
2. Check the database server
If the details are right, the database server may be down or hitting its connection limit. Check your host's status page; on shared hosting a busy neighbour can cause it.

3. Repair the database
If the admin area shows a different error about the database needing repair, add define('WP_ALLOW_REPAIR', true); to wp-config.php, visit /wp-admin/maint/repair.php, then remove the line afterwards. Take a backup first.
Still down? We'll get it back up.



