Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Resolve a disruption between WordPress and MySQL
This guide is for users making changes around a hosting environment where WordPress is installed.
Preamble
- Following a change in your web hosting plan (migration from the old v1 60 Go hosting formula to the current offers), you may need to update the connection between the MySQL/MariaDB database and your WordPress site (to avoid the error "
error establishing a database connection
" for example) and thus restore the link between WordPress and the MySQL/MariaDB database.
Modify the important elements
Here is the information to update in the wp-config.php
file to ensure your WordPress site works (in most cases, a prefix has simply been added to the existing database name and username):
- the name of the MySQL database (database namebefore, abcd_database name after ex)
- the MySQL database host server (mysql.domain.xyz before, abcd.myd.infomaniak.com after ex)
- the username that accesses the MySQL database (userbddbefore, abcd_userbdd after for example)
Modify the WordPress wp-config.php file
To do this:
- Find and keep your current MySQL information according to the list above.
- Create an FTP account.
- Log in via FTP.
- Edit the
wp-config.php
file located in the root folder of your WordPress site. - 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: