Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: The file 'wp-config.php' already exists

Tags:

I clicked on the 'Update WordPress' link in the admin dashboard of my WordPress site, and I am getting this 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."

When I try to click the "installing now" link, it seems that WordPress is installing fresh. I want to keep all of the content of my WordPress installation.

I have tried to change the name of the wp-config.php file but that didn't do anything.

like image 823
mgrantnz Avatar asked Sep 21 '15 02:09

mgrantnz


2 Answers

Is just a browser cache.

On first URL load, you are redirected from domain.ext to domain.ext/wp-admin/setup-config.php

If you are on Chrome, just open the developers console, go to "Network" tab. Reload the page and right click anywhere in the console, and hit "Clear browser cache".

Now refresh again and you will see your website

like image 125
Pierre R Avatar answered Sep 19 '22 13:09

Pierre R


I ran into this same issue while I was transferring a site. The issue ended up being with the .htaccess file. I fixed it by resetting my permalinks. There may be other causes to this issue but this worked for me:

  1. Click on General => Permalinks
  2. Click Save Changes (to reset permalinks)
like image 30
Marc Avatar answered Sep 22 '22 13:09

Marc