How to change PHP version on shared servers

In some cases, correct functioning of your website depends on a PHP version installed on the server. 

Thanks to the PHP Selector function, it is possible to select the necessary PHP version as well as enable/disable certain PHP modules and functions. 

To check what PHP version is currently in use, refer to this article

for cPanel paper_lantern theme
for cPanel x3 theme




for cPanel paper_lantern theme:

1. Log into your cPanel account. 
2. Scroll down to the Software section > Select PHP Version




3. Here you will see the list of available modules and extensions. 

If you do not need to change the PHP version and just want to turn on/off specific extensions, you can do this by checking/unchecking the corresponding boxes. 

Use the PHP Version drop-down box to select the required version, click on Set as current in order to apply the changes. 

NOTE: The 'native' PHP version does not allow changing any options. You can set the desired values using a php.ini file: 



5. To change individual settings within the PHP version in question, click on Switch to PHP Settings. 

By clicking on one of the options in grey, you will be presented with a drop-down list to change specific settings. Hit Apply to implement the settings: 



NOTE 1: It is recommended to update your website scripts and use PHP 5.4. If the latest software you run for your websites is not yet compiled for PHP 5.4, please contact the script vendor for a compatibility patch.

NOTE 2: 
If you used a php.ini file for editing your account PHP configuration before, you will need to replicate the custom values using PHP Selector tool. 

NOTE 3: 
In order to increase the max upload size, make sure to modify both post_max_size and upload_max_filesize values. 



for cPanel x3 theme:
 
To change the PHP version, follow the steps below: 

1. Log into your cPanel account.
2. Scroll down to the Software/Services section > Select PHP Version



3. Here you will see the list of available modules and extensions. 

If you do not need to change the PHP version and just want to turn on/off specific extensions, you can do this by checking/unchecking the corresponding boxes. 

Use the PHP Version drop-down box to select the required version, click on Set as current in order to apply the changes. 

NOTE: The 'native' PHP version does not allow changing any options. You can set the desired values using a php.ini file: 



5. To change individual settings within the PHP version in question, click on Switch to PHP Settings.

By clicking on one of the options in grey, you will be presented with a drop-down list to change specific settings. Hit Apply to implement the settings: 



NOTE 1:
It is recommended to update your website scripts and use PHP 5.4. If the latest software you run for your websites is not yet compiled for PHP 5.4,  please contact the script vendor for a compatibility patch.

NOTE 2:
If you used a php.ini file for editing your account PHP configuration before, you will need to replicate the custom values using PHP Selector tool. 

NOTE 3:
In order to increase the max upload size, make sure to modify both post_max_size and upload_max_filesize values. 


That's it!

               
                      Need any help? Contact our HelpDesk

Comments

We welcome your comments, questions, corrections and additional information relating to this article. Your comments may take some time to appear. Please be aware that off-topic comments will be deleted.

If you need specific help with your account, feel free to contact our Support Team. Thank you.

  • 0 Users Found This Useful
Was this answer helpful?

Powered by WHMCompleteSolution