[wp-trac] [WordPress Trac] #26969: Incorrect WP path set when creating a new site with wp in a subfolder

WordPress Trac noreply at wordpress.org
Fri Jan 31 18:05:49 UTC 2014


#26969: Incorrect WP path set when creating a new site with wp in a subfolder
-------------------------------+------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Upgrade/Install    |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by nacin):

 I don't think this is a safe enough assumption:

 > If no wp-config.php file exists in ABSPATH, but does in the parent
 folder
 > alongside an index.php file, assume WP is installed in that folder

 It's entirely possible you are running a PHP site with an index.php front-
 end controller, and that the wp-config.php file is just one level up for
 /blog/ (which is otherwise a full copy of WordPress). It's also possible
 you have two WordPress installs — / and /blog/, possibly even with a
 shared wp-config.php file.

 wp-load.php does check that one level up wp-settings.php does not also
 exist. This could help. But I feel this has the potential to cause more
 problems than it could solve. Short of parsing wp-blog-header.php, which
 sounds not very fun, I'm not really sure what we should do here. You cite
 the new wp_install hook — seems like it would make more sense for this
 check to remain plugin territory.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26969#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list