Can I run WP-CLI https://wp-cli.org/
command through PHP script, so I can install user selected WordPress themes automatically with PHP script
2 comments
Comments are closed.
Can I run WP-CLI https://wp-cli.org/
command through PHP script, so I can install user selected WordPress themes automatically with PHP script
Comments are closed.
As long as you can use the exec() or similar command. I use something like this to output the result of a wp-cli command:
Or simply:
See this answer: https://wordpress.stackexchange.com/questions/219230/utilize-wp-cli-from-inside-wordpress-not-ssh for further discussion.
You can do something like this:
Run it in a PHP script in your home directory.