David Anderson
2013-09-04 06:38:16 UTC
Hi,
I've become used to writing little scripts like this to do quick tests
on WordPress sites from the shell (the script would go in the site
directory):
<?php require_once('wp-load.php'); do_action('something'); ?>
This doesn't appear to work on a multisite install - the require_once()
call never returns.
Presumably it's because when running from the shell, WP can't determine
which 'site' is being loaded?
Question: Is there a way I can achieve what I'm aiming for? i.e. To run
code within the WP environment?
David
I've become used to writing little scripts like this to do quick tests
on WordPress sites from the shell (the script would go in the site
directory):
<?php require_once('wp-load.php'); do_action('something'); ?>
This doesn't appear to work on a multisite install - the require_once()
call never returns.
Presumably it's because when running from the shell, WP can't determine
which 'site' is being loaded?
Question: Is there a way I can achieve what I'm aiming for? i.e. To run
code within the WP environment?
David
--
WordShell - WordPress fast from the CLI - www.wordshell.net
WordShell - WordPress fast from the CLI - www.wordshell.net