WordPress could not establish connection to MySQL database after transfer?

When moving your existing WordPress MySQL database to us, you need to create a new empty database and import your existing database into the new one. If you do not know how to do that, just follow the Transfer existing MySQL database FAQ. However, the new database has a different username, name and password and your WordPress wp-config.php file still has the old database username.

Log into your cPanel -> File Manager and edit the following 3 lines in the wp-config.php file.

  • //MySQL settings – You can get this info from your web host
  • //The name of the database for WordPress
  • define(‘DB_NAME’, ‘Database Name‘);
  • //MySQL database username
  • define(‘DB_USER’, ‘Database User‘);
  • //MySQL database password
  • define(‘DB_PASSWORD’, ‘Password‘);

If you find any difficulties, you can contact us in our 24/7 Live Chat, where a representative of ours will gladly help you out.

WebHostFace

Share
Published by
WebHostFace