Hosting. Domains. Your next step online.

Fix a WordPress database connection error

How-to Guides PHP & databases

Check the database name, user, host and grants after moving a WordPress site.

  1. In File Manager, find the affected installation’s wp-config.php. Privately compare the database name, username and host with the destination host’s settings. cPanel can prefix names with the account name.
  2. In cPanel → Manage My Databases, verify that the database exists and the application user is assigned to it with the privileges WordPress needs. If a password change is necessary, update only that application’s configuration through a secure workflow.
  3. Verify the expected tables are present in phpMyAdmin and reload the site. If several applications fail at the same time, ask the host to check database service health. Keep the configuration and its secrets out of public logs and screenshots.

Read the cPanel documentation