loading...
Do you get the error message "Error establishing a database connection" when you open your WordPress website? Or the Dutch version: "Error making a database connection"? This is an annoying error that can be solved in several ways.
The error message looks like this:

This error message means that the WordPress fails to connect to the MySQL database. This can have several causes, all of which can be resolved in another way. One of the main reasons is that the information in your wp config.php file is not correct. We are therefore going to check this first.
Database information in wp-config.php correct?
Via FTP you can download your wp-config.php file. This contains all the information that WordPress requires to access your database: the name of the database, username, password and database host:
Therefore, check if this information is correct. For example, you may have moved your WordPress website and your database has changed. Also, your hosting partner may have transferred him to another server, though the DB_HOST in 9 of 10 cases is just "localhost". for example, it's not a localhost!
If the database information is correct, check to see if your database is accessible.
Check the MySQL server
When you are on a shared hosting package, especially with cheaper parties such as Versio, it may happen that the database server is out because you have too many visitors. It may even be that another website on the same server causes these issues. The easiest way to check this is to contact your hosting party and ask them if something is wrong. Also, check your hosting provider's Twitter account, the good providers usually proactively report any malfunctions!
When the error message is in the hosting, it is often the case that it goes by itself.
Repair your database
If the above solutions do not work, try to fix your database. Make the first backup Before you begin this! Sign in now via FTP and add the following line of code at the bottom of the wp-config.php file:
Now that you've added this, you can fix the database. You can do that via your website.nl/wp-admin/maint/repair.php. Replace "job website.com" with the URL of your own website. You are now coming to the following screen:

You can choose either option, but the second option will take a little longer. If you want to go ahead, choose the first option!
Add a new user to your database
Finally, I read on the Elegant Themes blog that sometimes it works to create a new user for your MySQL database. Also, change the username and password in your wp-config.php file.
Not yet successful?
If the above tips have not yet been done to restore your database connection, please contact your hosting partner!
Post A Comment:
0 comments so far,add yours