Include WordPress wp-load in separate file


$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

Include that at the top of your separate file and you’ll be good to go. 🙂

Leave a Reply