Have you ever wondered how you can hide alt-PHP versions from MultiPHP Manager's dropdown in cPanel/WHM? Well, if you are using CloudLinux on your cPanel/WHM server, you will notice that you have two tools for managing PHP versions - MultiPHP Manager, and the PHP Selector.
The MultiPHP Manager is meant for managing the ea-PHP versions which are installed with cPanel/WHM by default. On the other hand, the PHP Selector is for managing the alt-PHP versions which are the hardened PHP versions provided by CloudLinux.
However, by default, MultiPHP Manager will list both the ea-php and alt-php versions in all its dropdowns in cPanel and WHM. This can be frustrating and annoying! And I guess it's that frustration and annoyance that has led you here! Because many times, this is not the behaviour we want! We want to be able to hide the alt-php versions from MultiPHP Manager and display only the ea-PHP versions in its dropdowns. Well, breathe in and out, and then relax! Because this is gonna get resolved right now, right here.
In this article, I will show you simple steps for hiding the alt-php versions from the MultiPHP Manager dropdowns of a CloudLinux-based cPanel/WHM server. Please note that you need to be a server administrator with root access to execute the steps outlined here. Let's get started.
To hide the alt-php versions from MutliPHP Manager, login to your cPanel/WHM server with root access and perform the two steps below:
- Edit the file /opt/alt/alt-php-config/alt-php.cfg and change the values from "yes" to "no" for each alt-php version.
- In your terminal, run
#nano /opt/alt/alt-php-config/alt-php.cfg
. This will show the file content similar to the one shown below.#nano /opt/alt/alt-php-config/alt-php.cfg
[MultiPHP Manager]
alt-php44 = no
alt-php51 = no
alt-php52 = no
alt-php53 = no
alt-php54 = no
alt-php55 = no
alt-php56 = no
alt-php70 = yes
alt-php71 = yes
alt-php72 = yes
alt-php74 = yes
alt-php80 = yes
alt-php81 - yes - To hide an alt-php version, change its value above from "yes" to "no". Use the keyboard arrow keys to move the cursor to the values you want to change and make the necessary changes.
- Once done, hit Ctrl + X to exit. This will prompt you to save changes. Hit Y to select Yes, followed by Enter to confirm the replacement of the existing file.
- In your terminal, run
- Run the script
/opt/alt/alt-php-config/multiphp_reconfigure.py
to apply the changes.
After executing the above steps, test the different Multi-PHP Manager interface dropdowns to see that the changes have taken effect.
Congratulations! You now know how to hide alt-php versions from the MultiPHP Manager dropdowns of a CloudLinux-based cPanel/WHM server.