+91 - 9161069102 support@megaacshost.com

How to Fix WordPress Error Establishing a Database Connection step by step Guide?

How to Fix WordPress Error Establishing a Database Connection step by step Guide?

In this post, we will show you How to Fix WordPress Error Establishing a Database Connection step by step?

MEGA ACS HOST

WordPress is unable to make a connection with the database This is the main error occurs. There are a number of things that can affect your WordPress

The ‘Error establishing a database connection error can be caused due to some incorrect database information in your WordPress settings, corrupt database, or an irresponsive database server.

WordPress uses your Hosting database to store all of your website content and other data. Then WordPress connects to the database each time someone visits your website.

If any of these items like Password, Username are incorrect, so WordPress didn’t connect to your database server, and you’ll see this ‘Error establishing a database connection error. It is one of the most common WordPress errors which users face.

In order to solve this issue, we need to check two things i.e MySQL Database and wp-config.php file

For solve this error we need to check 2 things MySQL Database & wp-config.Php File

Below are the following data which WordPress uses to connect to the database

  • Database name
  • Database username
  • Database password
  • Database server

The above four information is stored in your WordPress configuration file i.e wp-config.php file. You need to check this information is present in wp-config.php matches with the MySQL database.

Step::1 Login to your hosting cPanel account

MEGA ACS HOST

Step::2 Click on   MySQL Database

MEGA ACS HOST

Step::3 Next find your Database and the user associated with that

MEGA ACS HOST

Step::4 In this new tab open File Manager section in your cPanel

MEGA ACS HOST

Step::5 Click over the public_html and then find wp-config.php file(if your WordPress is installed directly in your domain otherwise go to the relevant folder where you have installed WordPress and look for wp-config.php file

MEGA ACS HOST
MEGA ACS HOST

Step::6 Click on the wp-config.php file and select  Edit to see for all the information like database name, database username, database password etc..

MEGA ACS HOST

Step::7 check the credentials details correctly with the information you see in the MySQL Database section

MEGA ACS HOST

Step::8 In MySQL Database section Change the Database password 

MEGA ACS HOST

(For higher security to use  Password Generator for generating the strong Password)

MEGA ACS HOST

Step::9 After the password is generated, copy it and paste the same password in wp-config.php at the Database password field

MEGA ACS HOST
MEGA ACS HOST

Step::10 Click on Save changes once completed and check your website..

MEGA ACS HOST
MEGA ACS HOST

We hope this information helps guide you to How to Fix WordPress Error Establishing a Database Connection step by step

Leave a Reply

Your email address will not be published. Required fields are marked *