Error establishing a database connection

Solution:

In your cPanel, check your Database Username and Password, and also the Database Name. Make sure all the:

  • Hostname
  • Username
  • Password
  • Database

Are all correct to the new server. I am definitely sure, if you are using a shared hosting, the username will change.

Change the details accordingly in wp-config.php here: