- Messages
- 8,766
- Reaction score
- 305
- Points
- 83
If any user is using Wordpress and getting the database error.
Unable to establish database connection
Then follow these steps...
1) Open cpanel file manager.
2) Select wp-config.php file located in your wordpress root folder.
3) Open it in code editor.
4) Press Ctrl+F and find 'DB_HOST'. It should be on line 28
5) Right after that change the text any written to localhost.
6) After editing it should look like this.
Unable to establish database connection
Then follow these steps...
1) Open cpanel file manager.
2) Select wp-config.php file located in your wordpress root folder.
3) Open it in code editor.
4) Press Ctrl+F and find 'DB_HOST'. It should be on line 28
5) Right after that change the text any written to localhost.
6) After editing it should look like this.
Code:
/** MySQL hostname */
define('DB_HOST', 'localhost');
Last edited: