How Do I Change the PHP Version on My Hosting Account?

*This article applies to customers with Shared, Multi Site and Reseller hosting accounts only. If you have a VPS or Dedicated Server click on the "Multi PHP Manager" icon rather than "Select PHP Version".

By default all our Shared and Reseller servers run PHP 5.6 as the native PHP version, as times move on, many scripts are no longer supporting this PHP version and as such clients need to be able to run a newer version of PHP on their account.

Making a server wide change to do away with PHP version 5.6 would be a good move for those clients that have scripts that require PHP 7 or higher, but on the flip side it would also infuriate clients with scripts that will only run on PHP 5.6 as upgrading to a newer version would cause their scripts to break.

So to get around this issue, we are running a tool called "PHP Selector", a part of the CloudLinux operating system, which allows users to select the PHP version they would like to run on their hosting account. This allows users who don't need a newer PHP version to stick with 5.6, but it also allows users with scripts that require PHP version 7 or higher to be able to quickly switch to their desired version of PHP from within their cPanel interface.

So how do you switch between PHP versions?

Simple! Just log into your cPanel and then follow the steps below:

1. Under the "Software/Services" tab, click on the "Select PHP Version" icon.

Select PHP Version

2. From the drop down box, select the PHP version you would like to run on your account and click on the "Set as Current" button. If you want to switch back to the default PHP version running on the server at any time, you can select "Native" from the drop down box.

CloudLinux PHP Selector

3. After selecting your PHP version, you will see a list of the different PHP modules you can run. If you know the specific modules your script needs to run (check with the script vendors regarding this) then you can select them, else you can click on "Use Defaults" to use the same modules that are running in the servers default PHP configuration.

After selecting the desired modules that you'd like to run, click on the "Save" button.

Select PHP Modules

That's it! After clicking on the "Save" button your account will be running your chosen PHP version, rather than the server default.

Further Information

  • PHP Selector sets the PHP version on a per cPanel account basis, it is not possible to set the PHP version per directory. So if you have different scripts running on a single cPanel account with one script requiring a certain version of PHP and another script that requires a different version, you would need to split these scripts up so they were each running on individual cPanel accounts. (A Multi Site Hosting account would allow you to do this)
  • 44 Users Found This Useful
Was this answer helpful?

Related Articles

I'm having problems uploading with Filezilla

Sometimes Filezilla can be a bit quirky and thows up a `too many connections from this IP...

How Do I Upgrade my Package?

To find out about upgrading...... 1. Login to your client area at http://d9clients.com2. Click...

How Do I Parse HTML Pages As PHP?

You can tell apache to treat your .html pages as .php pages by adding the following line of code...

How To Implement Browser Side Caching

Implementing browser side caching tells your website visitors web browser to cache certain files...

How Can I Activate ionCube Loders?

If your script has been encoded using the ionCube encryption system, then you need to install the...