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
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You can do something like this:
Run it in a PHP script in your home directory.
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.