I have wp-cli installed on a WHM/cpanel server running multi-php versions with EasyApache4. I am able to use wp-cli when Im either in the directory where wp-config resides or I use the –path command but Im now trying to use a bash script that will go through all the websites on the server and run wp-cli commands and each time it returns the html output which you should only get when phar is disabled:
content-type: text/html; charset=UTF-8
I have followed the docs regarding enabling phar and added the following to the php.ini files for all versions of php on the server (5.5, 5.6 and 7)
suhosin.executor.include.whitelist = phar
I also have the following in .bash_profile to ensure that the correct php binary is being used:
alias wp=’/usr/local/bin/php /usr/local/cpanel/3rdparty/share/wp-cli/wp-cli.phar’
Im guessing that phar is not enabled when I use wp-cli with a script?
Here are some scripts Ive been trying to use