Knowledge base
1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!
Troubleshooting connection issues between WordPress and the database
This guide is intended for users who are making changes to a web hosting environment where WordPress is installed.
Introduction
- Following a change to your web hosting plan (migration from the old v1 60 GB hosting plan to the current plans), you may need to update the connection between your MySQL/MariaDB database and your WordPress site (to avoid the "
error establishing a database connection" error, for example) and re-establish 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 so that your WordPress site works (generally, a prefix has simply been added to the existing database name and username):
- the name of the MySQL database (bddname before, abcd_bddname after, for example)
- the server hosting the MySQL database (mysql.domain.xyz before, abcd.myd.infomaniak.com after, for example)
- the username used to access the MySQL database (userbdd before, abcd_userbdd after, for example)
Modify the wp-config.php file of WordPress
To do this:
- Find and save your current MySQL data according to the list above.
- Create an FTP account.
- Connect via FTP.
- Edit the
wp-config.phpfile, which is located in the root directory 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: https://faq.infomaniak.com/2072
Has this FAQ been helpful?