As we get close to completing all of our server upgrades, I wanted to go ahead and quickly highlight a feature that is available on the new servers. We’ve permitted clients to change the version of PHP that their site uses for many years now but this has always required a modification to the domain’s .htaccess file. Although this wasn’t particularly difficult, it has been simplified even further with the inclusion of PHP Selector. PHP Selector is a CloudLinux component that sits on top of CageFS and allows each cPanel user to select their desired PHP version.
Once you’ve logged into cPanel you’ll find the “Select PHP Version” option under the “Software” menu group as shown below.
Upon visiting that link you’ll see a drop down menu to change the PHP version for the account.
Once you’ve selected a new version and click “Set as current”, the cPanel account will immediately begin using the new version of PHP. Note that this also changes the version of PHP available via SSH and used by cron jobs. When compared with the previous functionality via .htaccess modifications, this is far easier. The only limitation is that you’re no longer able to change the PHP version per directory, it can only be changed per cPanel account.
Currently, PHP versions 5.4, 5.5, 5.6 and 7.0 are available. Version 5.6 is the default for all new accounts and the 7.1 beta should be available soon. Let us know what you think!