The file 'wp-config.php' already exists

Error: The file wp-config.php already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.

If you have recently updated WordPress to a newer version or installed the fresh setup of WordPress, you may face the issue of the site not working and show the below message instead.

The file wp-config.php already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.

Follow the below suggestions if it helps you. Personally, the first one is working fine for me.

Option 1:

  • Open Google Chrome and try to display the website first on the incognito tab. If it works correctly, do clear the browser cache.
  • Once the page refresh has been completed, the website will appear.
    You can use the following shortcuts to clear the browser cache.
    Windows: Ctrl + F5 Mac: CMD + Shift + R

Option 2:

The problem was there because of the following line in your wp-config.php. file. Please remove it and save your file.
Note: Please take the backup of your file before do any recommended changes to your files.