Fixing "error establishing a database connection"
WordPress is running but cannot reach its database. Your content is almost certainly still there.
1. Restart the container
- On your Pressy's overview, press Restart.
- Wait about thirty seconds and reload.
This fixes the common case, where the database process stopped or ran out of connections. Try it before anything else.
2. Check whether the database is still there
- Open Databases in your Pressy's sidebar.
- Your WordPress database is the first row, and it cannot be deleted from here.
If the list is empty or that row is gone, stop and write to us — do not create a new one, because a backup restore will bring back both the database and the files that match it.
3. Check the credentials WordPress is using
If the restart did not help and the database is listed:
- Open
public_html/wp-config.phpin the Files screen (edit a file). - Find
DB_NAME,DB_USERandDB_HOST. - Compare the name and user against the Databases screen.
They should match. If the user is right but the password is not, reset it on
the Databases screen with Reset password — the
new password is shown once — then put that password into wp-config.php as
DB_PASSWORD.
Change nothing else in that file. Keep a copy of the original before you edit it.
4. If it started right after a change
- After editing
wp-config.php— put your copy back. - After a plugin or theme update — restore the most recent backup.
- After a staging push — the push replaced live wholesale, and the backup taken automatically just before it is in your Backups list.
When to write to us
Write to us if a restart did not fix it and the credentials match. Say whether the Databases screen still lists your database — that tells us in one line which of two very different problems this is.
Didn’t solve it?
Write to us with your Pressy’s address and what you were doing when it went wrong. Answered by the people who built it.
Last updated