WordPress
Fix “Error establishing database connection”
Restore your site quickly when WordPress cannot reach the database.
Quick answer
Restore your site quickly when WordPress cannot reach the database.
- WordPress works best with a clean theme, minimal plugins, and caching enabled.
- Regular updates keep your site secure and compatible with modern browsers.
- Backups before updates prevent small mistakes from becoming big problems.
Key details
This error usually means your database credentials are incorrect or the database server is temporarily unreachable.
Most of the time, it is fixed by checking the wp-config.php file and confirming the database name and password.
If you are not comfortable editing files, our support team can help.
Step-by-step
- Open File Manager and locate wp-config.php.
- Confirm DB_NAME, DB_USER, and DB_PASSWORD match your database.
- Save and refresh your site.
Quick checklist
- Install LiteSpeed Cache
- Update themes and plugins monthly
- Back up before major changes
- Remove unused themes and plugins
Was this helpful?
Tell us what you need and we will improve this guide.
Related guides
5 min read
Install WordPress with the 1-click installer
Launch a WordPress site in minutes without technical steps.
6 min read
Speed up WordPress with LiteSpeed Cache
Get faster load times with a simple plugin setup.
4 min read
How to log in to WordPress admin
Find your WordPress login URL and reset access if needed.
6 min read
Update WordPress, themes, and plugins safely
Keep your site secure without breaking your layout.