Title: include wp-load.php from another directory
Last modified: August 20, 2016

---

# include wp-load.php from another directory

 *  [Microchip](https://wordpress.org/support/users/microchip/)
 * (@microchip)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/include-wp-loadphp-from-another-directory/)
 * Hello!
    I need to call a wp function from another php page in another server 
   directory (specifically I need to use wp_clear_auth_cookie();)
 * So I included in /site/logoff.php this code:
 *     ```
       require_once $_SERVER["DOCUMENT_ROOT"]."/wordpress/wp-load.php";
       wp_clear_auth_cookie();
       ```
   
 * but it doesn’t work.
    If I copy /site/logoff.php in /wordpress/logoff.php, it
   works! I need to use this code from /site/!
 * How can I resolve???
 * Thanks

The topic ‘include wp-load.php from another directory’ is closed to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [wp-load](https://wordpress.org/support/topic-tag/wp-load/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 0 replies
 * 1 participant
 * Last reply from: [Microchip](https://wordpress.org/support/users/microchip/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/include-wp-loadphp-from-another-directory/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
