If your cpanel server have cloudlinux + PHP Selector installed, you need to set all site to use inherit PHP before you can use PHP Selector.
This can be done in MultiPHP Manager or using command line
for i in $(cut -d: -f1 /etc/userdatadomains );do whmapi1 php_set_vhost_versions version=inherit vhost-0=$i;done
Tis command will set all web sites to use inherit PHP.
To set all site to use alt-PHP 7.4, run
selectorctl --change-to-version=7.4 --version=native
This will change PHP version for all sites that use native PHP to alt-PHP 7.4
Or you can use
cd /var/cpanel/users ls -1 | awk '{ print "selectorctl --set-user-current=7.4 --user="$1 }' | sh
See cloudlinux
Leave a Reply