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. 
This guide describes how to change php version on shared servers (Value, Professional and Ultimate plans). For Business SSD servers,

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: 



4. 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.6. If the latest software you run for your websites is not yet compiled for PHP 5.6, 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: 



4. 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.6. If the latest software you run for your websites is not yet compiled for PHP 5.6,  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. 
  • 26 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

Cannot connect to database

This error will occur within a web application when any of the following conditions are met:...

Files fail FTP transfer

When uploading many files at once (a CMS, for example), it is not uncommon for a few of the files...

I can't login to cPanel

Ensure that caps lock is off, and that you are completely sure what your cPanel password is. If...

I'm receiving a blank page

If your website or web application is displaying nothing but a blank, white page, then chances...

My FTP client says too many connections

The server will often reject a new FTP connection if too many are open for any given account. If...

Powered by WHMCompleteSolution