Email-Icon Created with Sketch. Group 3 Created with Sketch. Domains-SVG-Box Created with Sketch. Domains-SVG-Box Created with Sketch. Domains-SVG-Box Created with Sketch. Hosting-SVG-Box Created with Sketch. Hosting-SVG-Box Created with Sketch. Icon-Internet Created with Sketch. Hosting-SVG-Box Created with Sketch. Icon-Internet Created with Sketch. Icon-Internet Created with Sketch. Hosting-SVG-Box Created with Sketch. Hosting-SVG-Box Created with Sketch. Trust Pilot Stars Created with Sketch. 1-5-million Created with Sketch. Control-panel-Icon Created with Sketch. WSB-Brush Created with Sketch. WSB-Brush Created with Sketch. WSB-Brush Created with Sketch. Email-Icon Created with Sketch. Email-Icon Created with Sketch. Email-Icon Created with Sketch. Email-Icon Created with Sketch. Icon-ECommerce-Seperator Created with Sketch. Icon-ECommerce-Seperator Created with Sketch. Icon-ECommerce-Seperator Created with Sketch. icon-slider-next Created with Sketch. icon-slider-prev Created with Sketch. Webmail-icon Created with Sketch. heart Created with Sketch. Open-24-7 Created with Sketch. open24 Created with Sketch. 24 7 trusted Created with Sketch. Fill 1 Created with Sketch.

Update WordPress database connection details

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 MySQL password or if you get the following error message:


Error establishing a database connection

Step 1 - Open File Manager

Login to your One.com Control Panel and click File Manager.


Open File Manager

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.


Open wp-config.php

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.service.one.com');

Find details in wp-config.php

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 & MariaDB.

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.


Edit details in wp-config,php

Related articles:

Change your WordPress theme from the database
Disable WordPress plugins in phpMyAdmin