Title: [PATCH] wp-admin ABSPATH not defined for wp-config.php
Last modified: August 19, 2016

---

# [PATCH] wp-admin ABSPATH not defined for wp-config.php

 *  [gimler](https://wordpress.org/support/users/gimler/)
 * (@gimler)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/patch-wp-admin-abspath-not-defined-for-wp-configphp/)
 * 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 @@
        <?php
       -if ( defined('ABSPATH') )
       -       require_once( ABSPATH . 'wp-config.php');
       -else
       -    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'])));
       ```
   
 * greetings
    Gimler

Viewing 1 replies (of 1 total)

 *  [theapparatus](https://wordpress.org/support/users/theapparatus/)
 * (@theapparatus)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/patch-wp-admin-abspath-not-defined-for-wp-configphp/#post-667772)
 * 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 [http://trac.wordpress.org](http://trac.wordpress.org) by
   the way so that the developers can be made aware of it.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘[PATCH] wp-admin ABSPATH not defined for wp-config.php’ is closed to 
new replies.

## Tags

 * [ABSPATH](https://wordpress.org/support/topic-tag/abspath/)
 * [constant](https://wordpress.org/support/topic-tag/constant/)
 * [wp-admin](https://wordpress.org/support/topic-tag/wp-admin/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 1 reply
 * 2 participants
 * Last reply from: [theapparatus](https://wordpress.org/support/users/theapparatus/)
 * Last activity: [18 years, 6 months ago](https://wordpress.org/support/topic/patch-wp-admin-abspath-not-defined-for-wp-configphp/#post-667772)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
