I just want to download, install and setup WordPress using PHP.
I can do it using WP-CLI and command line and it worked.
Now I want to do it using with WP-CLI and PHP.
I read Run WP-CLI using PHP
The answer of above question suggest following code to test.
<?php $output = shell_exec("wp --info"); echo "<pre>".$output."</pre>"; ?>
I tried it, but it return nothing. How can I solve this issue?
- I am testing this with localhost (XAMPP).
wp --infoworking fine on command prompt.
shell_exec()working fine with other normal non wp commands.