wp-config.php tells WordPress how to reach its database. Update it after a migration or password change.
- In cPanel File Manager (article 111), open your site's root and edit wp-config.php.
- Update these four lines to match your database:
-
define('DB_NAME', 'your_database_name');-define('DB_USER', 'your_database_user');-define('DB_PASSWORD', 'your_password');-define('DB_HOST', 'localhost'); - Save the file.
Important: Get every value exactly right (article 122) — a single wrong character causes the "Error establishing a database connection" message (article 194). Back up the file before editing.
