Common causes
- Wrong database username or password
- Database does not exist
- Corrupted tables
- MySQL server overloaded
Step 1 — Check wp-config.php
DB_NAME DB_USER DB_PASSWORD DB_HOST = localhost
Step 2 — Test the database connection
In phpMyAdmin, try logging in with the same DB user. If login fails, credentials are wrong.
Step 3 — Repair the database
- Open phpMyAdmin
- Select the database
- Check all tables
- Choose Repair table
Step 4 — Restart plugins
Some caching or security plugins can break DB connections.
Step 5 — Check disk limits
If your plan reached disk quota, MySQL cannot write data.
Step 6 — Switch PHP Version
Incompatible PHP versions may break DB drivers.