If you are using PHP-FPM you cannot use Cloudlinux’s PHP selector so you may want to scrap PHP selector off the bat if that is the case, unless you plan on only using PHP-FPM for some account and not all.
If PHP-FPM isn’t a worry, then what I would recommend you doing is going into:
WHM > EasyApache4
customize the current profile, remove all PHP versions except for one, example PHP 7.0, then select all the extensions you want by default for that one PHP version, save.
Then go into
WHM > CloudLinux LVE Manager > Selector
Set your ‘Default php version’ to PHP 7.2(not native).
Then below that, I personally uncheck “native” all together.
at the very bottom click the “Panel Default” option and click “Save”.
This will select all the PHP extensions you chose for the PHP version in EasyApache.
You will want to do this for each PHP version there.
Next, go to
WHM > MultiPHP Manager
Make sure you set “System PHP Version” to EA-PHP70 (or whichever EA version you chose in EasyApache).
Make sure ALL cPanel accounts are set to the inherited version of PHP. This will make sure all cPanel accounts are now only able to use PHP versions from Cloudlinux’s PHP Selector.
I would also go to
WHM > Feature Manager
Edit your default and other feature list’s that you use and disable both the:
MultiPHP INI Editor
This way people don’t get confused with how they should be changing PHP versions and options.
So if you want to change the PHP version, enable/disable PHP extensions, and change PHP options like upload size, max execution time, etc, this is now all only from one single icon in cPanel:
“Select PHP Version”
Lastly, after all this is said and done, you might actually have issues with some accounts with missing extensions as Cloudlinux won’t reset the extensions for the accounts even though you’ve set the default options so you may need to do them manually, especially the ones you require Ioncube for. If you have lots of accounts, you can reset them via SSH like so
for i in $(\ls /var/cpanel/users) ; do selectorctl --reset-user-extensions --version=7.0 --user=$i ; done
That would reset all users extensions to use the default list you chose in EA for PHP 7.0, but just replace 7.0 with 7.2 as well if needed.
Pingback: Setup a WHM/CPanel Server – Lookout Host