Support » Everything else WordPress » include wp-load.php 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";

    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???


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