I can’t say I’ve ever tried including wp-load.php
directly, but I’ve had success using:
define("WP_USE_THEMES", false);
include("wp-blog-header.php");
… when trying to invoke WordPress stack in a non-templated workflow. wp_blog_header.php
does make the call out to wp-load.php
but also wires up some other stuff (such as calling wp()
).