- Step 1 - Open File Manager
- Step 2 - Open wp-config.php
- Step 3 - Locate the login details
- Step 4 - Update details
Sometimes you need to update the database connection details in WordPress. For example, after you have changed the database password or if you get the following error message:
Error establishing a database connection
Don't have a website yet? With WordPress, you can easily and quickly build the website of your dreams.
Step 1 - Open File Manager
- Log into the one.com control panel.
- Click File Manager on the Files & Security tile.
Step 2 - Open wp-config.php
The wp-config.php file is located in the directory where you installed WordPress.
Click on the wp-config file to open it in the editor.
Step 3 - Locate the login details
Usually, you can find the login details around line 20 in the wp-config file.
In this example the current details are:
define('DB_NAME', 'one_example_support'); define('DB_USER', 'one_example_support'); define('DB_PASSWORD', '********'); define('DB_HOST', 'one-example.support.mysql');
Step 4 - Update details
In the following example, you need to replace update_here with your own updated details.
You can find the current connection details in the one.com control panel under PHP and database settings.
define('DB_NAME', 'update_here'); define('DB_USER', 'update_here'); define('DB_PASSWORD', 'update_here'); define('DB_HOST', 'update_here');
Click Save in the upper left corner on your screen.
Related articles: