Avatar of steva
steva

asked on 

wp-blog-header.php not found

I've written a PHP file that I use as a template for a WordPress page and  I want to refer to some WordPress functions on the page so at the top I have:
require_once("/nas/wp/www/bb2/wp-blog-header.php");
 global $wpdb;

Open in new window


"/nas/wp/www/bb2/"  is the root of my site and I can clearly see that wp-blog-header.php is there in the root:
Site root
Yet, when the PHP file runs it throws the error:

              Warning: require_once(/nas/wp/www/bb2/wp-blog-header.php):  failed to open stream: No such file or directory . . .

Why doesn't it see wp-blog-header.php?

I have a staging copy of the site (the site is hosted on WP Engine, where it's easy to create staging sites) and it works there!  The only difference is that I included "staging" in the path to wp-blog-header.php:

 require_once("/nas/wp/www/staging/bb2/wp-blog-header.php");
 global $wpdb;

Open in new window


Does anyone have any idea what could be going on?  After half a day looking at this, I'm out of ideas.

Thanks
WordPressPHP

Avatar of undefined
Last Comment
Dave Baldwin

8/22/2022 - Mon