Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Resolve a disconnection between WordPress and MySQL
This guide is for users making changes around a hosting where WordPress is installed.
Following a change in your Web hosting offer (migration from the old hosting plan v1 60 GB to the current offers), you may need to update the connection between the MySQL/MariaDB database and your WordPress site (to avoid the "error establishing a database connection" error for example) and thus restore the link between WordPress and the MySQL/MariaDB database.
Elements to Modify
Here are the details to adapt in the wp-config.php file to make your WordPress site work (generally, a prefix has simply been added before the existing database name and username):
- the name of the MySQL database (bddname before, abcd_bddname after, for example)
- the MySQL database host server (mysql.domain.xyz before, abcd.myd.infomaniak.com after, for example)
- the username accessing the MySQL database (userbdd before, abcd_userbdd after, for example)
Modify the wp-config.php file of WordPress
To do this:
- retrieve and keep your current MySQL information according to the list above
- create an FTP account
- Connect via FTP
- edit the wp-config.php file located in the root folder of your WordPress
- find the relevant paragraph and update the 3 pieces of information (according to the list above)
- save the file and that's it, your WordPress will now connect to the correct database
Link to this FAQ: