How to Install PHP Selector in WHM: CloudLinux and EasyApache4 Guide

If you manage multiple sites or client accounts on a WHM/cPanel VPS, PHP Selector (CloudLinux) solves a common problem: different users need different PHP versions and extensions on the same server. Instead of forcing a single PHP stack for everyone, PHP Selector lets each cPanel account choose its PHP version (Alt-PHP) and toggle extensions without server-wide changes.
This guide explains what PHP Selector is, when to use it, and how to install it correctly on a CloudLinux VPS running WHM/cPanel with EasyApache 4.
What is a PHP Selector (and Why It Matters on a VPS)?
PHP Selector is a CloudLinux component that works alongside CageFS to let end users select the PHP version and modules they need. It’s especially useful in multi-tenant setups (many accounts on one VPS), where one application may need a newer PHP release while another requires an older version or specific extensions.
CloudLinux notes that PHP Selector sits on top of CageFS and requires CageFS to be enabled for accounts that will use it.
Prerequisites Before You Install
Before installing PHP Selector, confirm these requirements (these are the common reasons installs “work” but the selector doesn’t show up):
-
CloudLinux is installed
-
CageFS is installed and enabled for any users who will use the PHP Selector
-
Your Apache PHP handler is CGI/suPHP/FCGI (and mod_suexec is installed)
-
Avoid handler conflicts: CloudLinux notes that PHP Selector is not compatible with PHP-FPM or mod_php/DSO.
If you’re running WHM/cPanel on a VPS and you’re still deciding whether cPanel is included or licensed separately, reference our cPanel decision guide.
Step-by-Step: Install CloudLinux PHP Selector (Alt-PHP)
PHP Selector uses Alt-PHP packages (CloudLinux), which differ from the EA-PHP packages installed via EasyApache 4. If you only installed PHP versions in WHM/EasyApache, they may not appear in PHP Selector until Alt-PHP is installed.
Step 1: Install Alt-PHP Packages
The simplest approach is to install the full Alt-PHP group package.
On RHEL 7 / CloudLinux 7:
yum groupinstall alt-php
yum update cagefs lvemanager
On CloudLinux / AlmaLinux / Rocky Linux 8 or 9:
dnf groupinstall alt-php
dnf update cagefs lvemanager
Step 2: Confirm CageFS is Enabled For Users Who Need Php Selector
PHP Selector requires CageFS to operate for the target accounts. In CloudLinux Manager / LVE Manager, CageFS should be enabled and initialized as needed.
Step 3: Adjust WHM MultiPHP Manager So PHP Selector Can Take Control
cPanel’s guidance for using PHP Selector alongside MultiPHP is practical:
-
In WHM → MultiPHP Manager, ensure users intended for PHP Selector have PHP-FPM disabled and are set to inherit the system PHP version (rather than forcing a per-domain version).
Step 4: Verify “Select PHP Version” Appears in cPanel
Once installed correctly, users should see Select PHP Version inside cPanel, where they can choose their account-wide PHP version and extensions.
If a PHP Version is Missing in PHP Selector
A very common scenario: you installed PHP 8.x in EasyApache 4, but it doesn’t show in PHP Selector. That’s because EA-PHP and Alt-PHP are different package families.
Install the required Alt-PHP version group, for example:
yum groupinstall alt-php80*
Or install all Alt-PHP versions:
yum groupinstall alt-php*
PHP Selector vs MultiPHP Manager: When to Use Which
It helps to think of these tools as solving different scopes:
-
MultiPHP Manager (cPanel) sets PHP per document root (so different domains/folders can use different PHP versions).
-
PHP Selector (CloudLinux) sets PHP for the entire cPanel account, and its major advantage is allowing per-account PHP extension control (users can toggle extensions without server-wide changes).
They can coexist, but mixing per-domain and per-account behavior can be confusing.
Where To Manage PHP Selector Settings (Admin Side)
After installation, admins typically manage defaults and supported versions inside CloudLinux Manager / LVE Manager:
-
You can enable/disable PHP Selector, set the default PHP version, choose supported versions, and define default modules.
-
CloudLinux also emphasizes CageFS must be enabled for PHP Selector to operate.
Why This Matters on a KVM VPS
On a KVM VPS used for multi-site hosting (multiple cPanel accounts), PHP Selector helps you avoid “one PHP version breaks another site” situations. It also reduces admin overhead because users can switch versions and extensions themselves within the versions you allow.
FAQs
-
Does PHP Selector work with PHP-FPM?
Generally, no, CloudLinux notes that PHP Selector is not compatible with PHP-FPM. If you want a PHP Selector per account, disable PHP-FPM for those users and let them inherit the system PHP version in MultiPHP Manager.
-
Why don’t my EasyApache PHP versions show in PHP Selector?
Because EA-PHP (EasyApache 4) and Alt-PHP (CloudLinux PHP Selector) are different. Install the matching Alt-PHP packages (or the full Alt-PHP group) to make versions appear in the PHP Selector.
-
Is PHP Selector per-domain or per-user?
PHP Selector applies one PHP version per cPanel account (per-user). MultiPHP Manager is the tool that applies versions per document root.
-
What’s the biggest advantage of PHP Selector over MultiPHP alone?
PHP Selector allows per-account PHP extension control, so users can enable/disable extensions without needing the host to change server-wide settings.