1. Home
  2. WordPress
  3. Edit the WordPress Configuration File

Edit the WordPress Configuration File

If you get an error message on your website, Database connection error or another similar database error, you likely have an incorrectly configured configuration file (wp-config.php), which connects your website to the database. The file needs to be modified to use the correct database connection parameters.


If you already have WordPress installed on your hosting, you need to log in via FTP.

  1. Once you’ve logged in via FTP, open the WEB root folder (if you have WordPress installed on the main domain) or the SUB folder (if you’ve installed WordPress on a subdomain).
  2. Here you’ll find and open the file called wp-config.php
  3. Here you simply check that you have the correct database values configured according to the database you’ve already created, and change them if needed. Only four fields need to be changed: the host, name, user, and password for the database.
Updated on 9. July 2026
Was this article helpful?

Related Articles