Installing and activating CloudLinux’s PHP Selector can be a valuable addition to your server management toolkit, offering greater flexibility and control over PHP versions for your web applications. CloudLinux’s PHP Selector offers similar functionalities to cPanel’s MultiPHP Manager, but offers more customization to the individual user, as well as legacy versions of PHP not offered by MultiPHP Manager. PHP Selector can be used on individual accounts while others remain using MutliPHP Manager. Here is a detailed guide on how to install and activate it:
Prerequisites:
CloudLinux OS: Ensure that your server is running CloudLinux OS. PHP Selector is a feature provided by CloudLinux, so it’s essential to have CloudLinux installed.
Access: You need root access or sudo privileges on your server to install and configure PHP Selector.
Installation Steps:
Update System Packages:
Before installing PHP Selector, it’s good practice to update your system’s package repositories to ensure you’re installing the latest versions of the software.
Install PHP Selector:
CloudLinux provides an easy-to-use script for installing PHP Selector. Run the following command in your terminal:
This command downloads the installation script from CloudLinux’s repository and executes it.
Verify Installation:
Once the installation is complete, verify that PHP Selector is installed correctly by checking its version:
You should see the version number of PHP Selector displayed in the output.
Activation Steps:
Enable PHP Selector for Reseller:
If you are a reseller and want to enable PHP Selector for your customers, use the following command:
Replace `ResellerUsername` with the username of the reseller account for whom you want to enable PHP Selector.
Activate PHP Selector for a Domain:
To activate PHP Selector for a specific domain, use the following command:
Replace `Username` with the username of the account to which the domain belongs, and `example.com` with the domain name. You can also specify the PHP version by replacing `lsphp` with the desired PHP version (e.g., `lsphp74` for PHP 7.4).
Restart Apache or LiteSpeed:
After enabling PHP Selector, you need to restart the web server for the changes to take effect:
or
Congratulations! You’ve successfully installed and activated CloudLinux’s PHP Selector on your server. With PHP Selector, you can now easily manage PHP versions for different domains, providing flexibility and compatibility for your web applications. Make sure to test your websites thoroughly after changing PHP versions to ensure compatibility and optimal performance.