How to Solve “Establishing Database Connection” Error
When installing a template you can face “Establishing database connection” error. From this tutorial you’ll learn how to solve the issue.
Solving “Establishing Database Connection” Error
- First, let’s navigate to your hosting server cPanel file manager tool, or establish a connection via FTP with your hosting server. You need to access WordPress root folder (it is the folder where you’ve installed WordPress engine).
- Here locate “wp-config.php” file and click on “Edit” button to open it for editing. If you’re using FTP file manager, you need to upload the file to your hard drive to open it with any code editor convenient for you (e.g., Notepad++, Sublime).
- You need to locate your database details in the file content. Please, make sure that the “db_name”, “db_user”, “db_password” and “db_host” details are the same that you’ve provided when installing WordPress engine. They should match.
- Save the changes. If you’ve used FTP file manager, please, upload the file back to WordPress root folder.
- As a result, the error won’t bother you again.