[wp-trac] [WordPress Trac] #12988: Modify wp-load.php to search for wp-config.php 2 directories higher
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 13 21:51:37 UTC 2010
#12988: Modify wp-load.php to search for wp-config.php 2 directories higher
--------------------------------+-------------------------------------------
Reporter: chipbennett | Owner: ryan
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Security | Version:
Severity: normal | Resolution: wontfix
Keywords: wp-load, wp-config |
--------------------------------+-------------------------------------------
Comment(by chipbennett):
How is causing an extra file seek any different from the *current* wp-
load, that *already* looks one directory above ABSPATH if it doesn't find
wp-config at ABSPATH?
So, why is it okay for wp-load, as it currently does, to search one
directory up from ABSPATH, but it would be some phenomenally huge server
load for wp-load to search up one additional directory?
Nacin's argument isn't really relevant, either, since if wp-load finds wp-
config at ABSPATH or one directory up, it doesn't look anywhere else.
Also, the most predominant use case - by FAR, since by default WordPress
unpacks itself inside a "wordpress" subdirectory - is for WordPress to be
installed in a subdirectory.
By that argument, wp-load should be changed such that it doesn't look one
directory up, either. It should always/only look in ABSPATH.
Regarding Scribu's argument: that suggestion is all well and good, except
that, again, the vast majority of the userbase has WordPress installed in
a subdirectory (which is a requirement of multisite, also), and it's a
much bigger pain to migrate the entire WordPress install, with thousands
of posts, comments, and pages (many of which, with attachments), out of a
subdirectory into the base directory.
Finally, regarding the matter of extra file-searches: why not define a
variable (similar to ABSPATH) that holds the path to wp-config, and only
run the file-search if the variable is undefined? In other words, it only
ever happens once, and then after that, wp-config is just included.
I think this should be re-considered.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12988#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list