wordpress - Run WP-CLI using PHP -
i've installed wp-cli on mac , next step execute wp-cli commands using php script.
i've tried implement following way not see happening. can please @ code , tell me i'm doing wrong?
define( 'wp_cli_root', '/usr/local/bin/wp' ); include wp_cli_root . ''; $output = shell_exec("wp --info"); echo "<pre>".$output."</pre>";
do need configure , setup wp-cli php files?
also, when type wp --info on terminal following information comes up. nothing appearing beside package dir & global config. need make adjustments wp-cli?
mac-00343:htdocs mike$ wp --info php binary: /usr/bin/php php version: 5.6.30 php.ini used: wp-cli root dir: phar://wp-cli.phar wp-cli vendor dir: phar://wp-cli.phar/vendor wp_cli phar path: /users/mike/docker/xamp/www/wordpress_wwws/htdocs wp-cli packages dir: wp-cli global config: wp-cli project config: wp-cli version: 1.3.0
any or suggestions appreciated.
thanks
here wp --info
returns on terminal.
the main difference see php.isi used:
field.
sorry cant more, dont know docker is, , using mamp, not xamp
phar path
current directory i'm working in
Comments
Post a Comment