Help Docs Control Panel Guides The Ultimate Guide to the WHM Control Panel (2025) PHP Management in WHM Using the CloudLinux PHP Selector in cPanel and WHM

Using the CloudLinux PHP Selector in cPanel and WHM

Learn to manage PHP versions & extensions using CloudLinux PHP Selector in cPanel/WHM. See how it offers more granular control than cPanel's MultiPHP.

Managing PHP versions and extensions is crucial for website compatibility, performance, and security. While cPanel offers its MultiPHP Manager, CloudLinux OS provides a more granular tool called PHP Selector. This article explains how to use the CloudLinux PHP Selector in both cPanel (for end-users) and WHM (for server administrators), and contrasts it with cPanel’s MultiPHP.

What is the CloudLinux PHP Selector?

The CloudLinux PHP Selector is a feature integrated into CloudLinux OS that allows cPanel users to choose specific PHP versions for their accounts and manage PHP extensions directly. This provides flexibility that goes beyond standard PHP management tools, empowering users to tailor their PHP environment to the precise needs of their web applications without requiring intervention from their hosting provider for every change.

The other popular feature of CloudLinux PHP selector is its offering of hardened, older, end-of-life PHP versions that normally wouldn’t be offered by cPanel.

Using the PHP Selector in cPanel (for cPanel users)

If your hosting account is on a server running CloudLinux with PHP Selector enabled, you can easily customize your PHP environment.

  1. Log in to your cPanel account.
  2. Scroll down to the Software section and click on Select PHP Version.

Changing your PHP version

On the Select PHP Version page, you’ll see your current PHP version. To change it:

  1. Click the dropdown menu showing the current version.
  2. Select your desired PHP version from the list (e.g., 7.4, 8.0, 8.1, 8.2, 8.3). CloudLinux often provides a range of versions, including older, hardened versions for legacy applications.
  3. Click the Set as current button next to the dropdown. The page will refresh, applying the selected version to your account.

Managing PHP extensions

Once you’ve selected a PHP version, the page will display a list of available PHP extensions for that version. Extensions are modules that add functionality to PHP.

  • To enable an extension, check the box next to its name.
  • To disable an extension, uncheck the box.
  • Changes to extensions are typically saved automatically. Some common extensions you might manage include mysqli, pdo_mysql, imagick, ioncube_loader, opcache, or memcached.

Note: Only enable the extensions your websites specifically require. Enabling unnecessary extensions can consume additional server resources.

Editing PHP options (php.ini directives)

The CloudLinux PHP Selector also allows you to modify common php.ini directives directly from the cPanel interface.

  1. At the top of the Select PHP Version page, click on the Options tab.
  2. Here, you can adjust values for settings like:
    • memory_limit: Maximum amount of memory a script can consume.
    • upload_max_filesize: Maximum size of an uploaded file.
    • post_max_size: Maximum size of POST data that PHP will accept.
    • max_execution_time: Maximum time in seconds a script is allowed to run.
    • display_errors: Whether errors should be displayed to the browser (useful for debugging, but should be off for live sites).
  3. Click on the value you wish to change. A dropdown or input field will appear. Select or enter your new value.
  4. Changes are typically saved automatically when you click away or select a new value. Ensure you see a confirmation message if one is provided.

Managing PHP Selector in WHM (for server administrators)

Server administrators use WHM to manage the PHP Selector settings for all users on the server.

  1. Log in to WHM as root or a reseller with appropriate privileges.
  2. In the search bar, type “CloudLinux LVE Manager” and click on the link, or navigate to it directly (often found under Server Configuration or Plugins).
  3. Within LVE Manager, go to the Selector tab.

Here, administrators can:

  • Choose PHP Versions: Select which PHP versions (e.g., 5.6, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3) will be available for users to choose from in their cPanel interface. It’s good practice to disable end-of-life PHP versions unless absolutely necessary for specific clients.
  • Set Default Extensions: For each available PHP version, you can define a default set of extensions that will be enabled for users. Users can then customize this list further from their cPanel.
  • Enable/Disable PHP Selector: You can control whether the PHP Selector functionality is available to users.
  • Set Default PHP Version: Choose the default PHP version for newly created cPanel accounts.

After making changes, ensure you click the Save Changes or equivalent button to apply them.

You may also need to run /usr/sbin/cagefsctl --force-update and /usr/sbin/cloudlinux-selector setup --json --interpreter php --set-user-current default --user=all via SSH if changes aren’t immediately reflected for users, though usually the WHM interface handles this.

CloudLinux PHP Selector vs. cPanel MultiPHP Manager

Both CloudLinux PHP Selector and cPanel’s MultiPHP Manager allow users to switch PHP versions, but they have key differences:

FeatureCloudLinux PHP SelectorcPanel MultiPHP Manager
PHP extension granularityUser selects PHP version and specific extensions for their entire account.User selects PHP version on a per-domain basis.
Extension managementUsers can easily enable/disable PHP extensions via the cPanel UI for their chosen PHP version.PHP extensions are generally managed globally by the admin for each PHP version (via EasyApache profiles). Users have limited to no direct control over extensions through MultiPHP Manager itself. Custom php.ini files can be used with PHP-FPM, but this is more complex.
PHP options (php.ini)Users can modify common php.ini directives (like memory_limit, upload_max_filesize) directly from the cPanel UI for their selected PHP version.Users can use the MultiPHP INI Editor in cPanel to change some directives if the admin has enabled it and for the specific PHP version assigned to their domain. Admins use WHM’s MultiPHP INI Editor for broader control.
Available PHP versionsOften provides a wider range of PHP versions, including hardened versions of older PHP releases for improved security and stability of legacy applications.Provides PHP versions available through EasyApache (cPanel’s software for compiling Apache and PHP).
OS dependencyRequires CloudLinux OS.Available on standard cPanel installations (AlmaLinux, Rocky Linux, Ubuntu Server, CloudLinux).
User empowermentHigher, especially regarding direct management of extensions and common PHP settings.Primarily for version switching; extension and deep configuration control is more limited for end-users.

By offering this level of control, the CloudLinux PHP Selector helps users ensure their applications run smoothly and efficiently, providing a more flexible and user-friendly PHP management experience.

Was this article helpful?