WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#40095 closed defect (bug) (invalid)

installation looks outside of it's installation directory

Reported by: jbvignaud Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.3
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

I was trying to install another instance of wp in a shared env (apache virtual hosts) but it did say that wp was installed already, and proposed me to log in another installation.

installation was in /home/www/site3/(wp files)

After debug, i found that wp install was looking for a wp-config.php in "/home/www/" (outside of it's installation directory). And of course, there i had a wp-config.php, copy of an existing site's wp-config.php.

I had to remove it to be able to install.

Change History (1)

#1 @swissspidy
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hey there,

Thanks for taking the time for this report and welcome to Trac!

After debug, i found that wp install was looking for a wp-config.php in "/home/www/" (outside of it's installation directory). And of course, there i had a wp-config.php, copy of an existing site's wp-config.php.

That's intended behaviour. If there's no wp-config.php file in the current directory, WordPress tries to search for it one level above. That's useful when you install WordPress in a sub-folder (e.g. example.com/wp/) or when you don't want your config file to sit in the web root.

Note: See TracTickets for help on using tickets.