WordPress Outside of WordPress Not Executing
-
I’m having some trouble including WordPress from outside itself via command line.
When visiting
hello.php
in the browser, it works just fine; however, when executed via command line,php5 /var/project1/hello.php
, nothing happens.hello.php
contains only the following code:` <?php
require(‘/var/project2/wp-load.php’);
echo “hello world”;
?>`When I delete
require('var/project2/wp-load.php');
from the code, and execute via command line, it correctly displayshello world
.I checked permissions, which are fine (unless I’m mistaken). There aren’t any errors in nginx or php5-fpm. Requiring
wp-blog-header.php
instead ofwp-load.php
has the same effect.I’m completely stumped as to how to make
php5 /var/project1/hello.php
correctly execute.
- The topic ‘WordPress Outside of WordPress Not Executing’ is closed to new replies.