ABSPATH

The WordPress Core ABSPATH constant.

Value (string)

dirname( dirname( __FILE__ ) ) . '/' 

Usage

  1. if ( defined( 'ABSPATH' ) ) { 
  2.  
  3. // grab the value 
  4. $value = constant( 'ABSPATH' ); 
  5.  
  6. if ( !empty( $value ) ) { 
  7. // go forth and prosper... 
  8.  

Defined (5)

The constant is defined in the following location(s).

/wp-admin/load-scripts.php  
  1. define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' ); 
/wp-admin/load-styles.php  
  1. define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' ); 
/wp-admin/setup-config.php  
  1. define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' ); 
/wp-config-sample.php  
  1. define('ABSPATH', dirname(__FILE__) . '/'); 
/wp-load.php  
  1. define( 'ABSPATH', dirname( __FILE__ ) . '/' );