Support » Requests and Feedback » [PATCH] wp-admin ABSPATH not defined for wp-config.php

  • i have more than one blog so i will symlink the wp-admin folder but for this i must patch the wp-admin/admin.php file

    the problem is that the ABSPATH constant is not defined a this point.

    Index: wp-admin/admin.php
    --- wp-admin/admin.php  (revision 12646)
    +++ wp-admin/admin.php  (working copy)
    @@ -1,8 +1,6 @@
    -if ( defined('ABSPATH') )
    -       require_once( ABSPATH . 'wp-config.php');
    -    require_once('../wp-config.php');
    +$config_path = dirname($_SERVER["SCRIPT_FILENAME"]) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'wp-config.php';
    +require_once( $config_path );
     if ( get_option('db_version') != $wp_db_version ) {
            wp_redirect(get_option('siteurl') . '/wp-admin/upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])));


Viewing 1 replies (of 1 total)
  • theapparatus



    As per the stickies, please don’t post code here in the forums unless asked to as it normally doesn’t show correctly.

    Patches should go to by the way so that the developers can be made aware of it.


Viewing 1 replies (of 1 total)
  • The topic ‘[PATCH] wp-admin ABSPATH not defined for wp-config.php’ is closed to new replies.