When I acces my WordPress site I get the error: Error establishing a database connection. What can I do ?

Frequently Asked Questions Applications | wordpress | database | error
Discover why when accessing your WordPress site you get the error: Error establishing a database connection, and what should you do in this sittuation.
by Ana RednicViews 120Updated now 6 monthsPublished 25/10/2018

This error message tells us that the WordPress application cannot connect to the database server. This error may have multiple causes.

The most common cause is the wrong login data in the wp-config.php file. For resolving, we will make sure that the data in the following fields are correct:

define('DB_NAME', 'Database name');
define('DB_USER', 'Database user');
define('DB_PASSWORD', 'User password');
define('DB_HOST', 'localhost');

This data must be the same as those set in the control panel.

Another cause of this error message is the depletion of the resources allocated to the hosting package. To resolve this, you will need to optimize your WordPress application and/or think about a higher hosting package.



Similar Articles

What is the difference between Hosting, Domain and Website?Frequently Asked Questions General | domain | hosting | nameservers | website
Three different but related elements. There is often a confusion, so it is important to know the difference between them, in order to be able to carry out the online activity as efficiently as possible.
by Mihai BobriucViews 2171Updated now 4 monthsPublished 17/07/2018
I paid for the transfer of a domain, why is the status 'pending'?Frequently Asked Questions Domains | domain | transfer | period
Find out if transferring a domain is an instant procedure.
by Mihai BobriucViews 272Updated now 3 monthsPublished 22/08/2018
My site is loading slowly. Why?Frequently Asked Questions General | site | load | speed
Find out why your website is loading slowly!
by Ana RednicViews 179Updated now 6 monthsPublished 25/10/2018
I have purchased a hosting package and wish to transfer one/several sites to you. How should I proceed?Frequently Asked Questions General | migration | hosting | site
The migration procedure can be complex. This article gives you all the information you need.
by Mihai BobriucViews 135Updated now 5 monthsPublished 04/07/2021
What's the difference between traditional and cloud hosting services?Frequently Asked Questions Technical | cloud | hosting | host | vps
Traditional Hosting Services vs. Cloud Hosting
by Mark DohiViews 98Published now 10 monthsPublished 29/04/2022