[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
Wed Apr 14 17:45:52 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):

 Replying to [comment:10 dougal]:
 > I also thought the idea of setting a variable to (optionally) define the
 location of wp-config was a good one. Until I thought about it a little
 more.
 >
 > Where would we define this? The general idea is supposed to be that wp-
 config.php is the only file you should ever have to edit. To implement
 this, you'd have to modify either `index.php`, `wp-blog-header.php`, or
 `wp-load.php` directly. And we all know that modifying core files is a no-
 no.
 >
 Sorry for the confusion, but doesn't ABSPATH get defined in this way?

 Why would it be such intense overhead to define a CONFIGPATH (or whatever)
 in the same way?

 > About the only thing left would be to examine something in the server
 environment variables (set in .htaccess, perhaps?). But that doesn't
 translate across different web servers in a consistent way.
 >
 I'm also intrigued by Ronald Huerca's suggestion (via Josiah Cole) of
 denying web access to wp-config using .htaccess - but that's outside the
 scope of this ticket.

 > I'm thinking the "fake wp-config that includes the real wp-config" is
 the best solution for anyone who really feels the need to do something
 like this. Most users who know enough to want to move their config file
 two levels up in the first place will be capable of understanding this
 idea. If somebody hasn't already documented this idea on the Codex,
 perhaps we should.
 >
 Yep; it seems that I'm going to have to move to this method, unless/until
 wp-load is ever made more accommodating.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12988#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list