[wp-trac] Re: [WordPress Trac] #6933: Allow wp-config.php to exist one level up from WordPress root directory

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 11 00:33:21 GMT 2008


#6933: Allow wp-config.php to exist one level up from WordPress root directory
-------------------------+--------------------------------------------------
 Reporter:  sambauers    |        Owner:  anonymous
     Type:  enhancement  |       Status:  reopened 
 Priority:  normal       |    Milestone:  2.6      
Component:  General      |      Version:  2.5.1    
 Severity:  normal       |   Resolution:           
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------
Changes (by auirshadow):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 One problem still exists. If you move wp-config.php out of web root, but
 also  [http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory give
 WordPress it's own directory] then technically wp-config.php is now two
 levels below ABSPATH and WordPress can't find wp-config.php.

 I propose adding the following lines to wp-load.php between lines 33 and
 34
 {{{
 } elseif ( file_exists( dirname( dirname(ABSPATH) ) . '/wp-config.php' ) )
 {

         /** The config file resides two levels below ABSPATH */
         require_once( dirname( dirname(ABSPATH) ) . '/wp-config.php' );

 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6933#comment:25>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list