[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 10:22:08 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 Denis-de-Bernardy):

 Replying to [comment:1 nacin]:
 > Hey Denis. Gonna need more info than that. :-) How are you creating such
 a site, given that home and siteurl are not configured until after the
 fact? If you are placing WordPress in /wp/ and an index.php file at the
 root including /wp/wp-blog-header.php, I'm not sure that'd be particularly
 fun for WordPress to pick up on.

 The attached patch checks for wp-config.php in ABSPATH, and falls back to
 trying the same in the parent folder *and* an index.php file. If it finds
 both, it assumes WP resides in a subfolder and populates home_url
 accordingly.

 I can make it actually read the file if you want, so as to make it check
 for the "/wp-blog-header.php" string, but I think it's a bit overkill.

 > If you're gonna do an installation like this (which is quite a bit of
 manual work), it seems like changing the home URL after the fact is
 perfectly reasonable.

 It is; especially now with the new wp_install hook. But much like the MS
 installer problem I mentioned, it would be nicer to get it right to begin
 with. If you're not the slightest bit interested, just close the ticket,
 and I'll use existing hooks and a wp-content/install.php file to sort out
 all of these issues.

 Btw, I replied to the url_to_postid ticket you pointed to — you can safely
 commit that patch.

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


More information about the wp-trac mailing list