Set PHP version for web hosting account in cPanel


Added: 10.03.2014 23:26:29     Last updated: 11.05.2019 14:42:33

The guide shows how to proceed to set the PHP version for the web hosting account with us, as well as how to configure PHP via cPanel. The guide requires you to first log into cPanel.

Step 1:
Click on the icon for "Select PHP Version" as shown in the screenshot below:

Click Select PHP Version in cPanel

Step 2:

  1. Choose the version of PHP you want to run on your web hosting account. "Native" will run the PHP version that is standard for the specific server your web hosting service is located on, and the version is listed in parenthesis (7.0).
  2. Click on the button "Set as current" to save the change.

Choose PHP version in cPanel

Step 3:

  1. When you have chosen a version you can click on "Use defaults" the first time, to be sure that the most common modules have been added.
  2. You may now add/remove modules that should be run for PHP on your web hosting account, depending on your requirements.
  3. Click "Save" to start using the changes.
  4. To change the limits that are set via PHP you click on "Switch To PHP Options"
Available PHP extensions in cPanel


Step 4:
Via "PHP Options" you can adjust/change the most used limits that are set for PHP, and here we show only an example.

  1. memory_limit defines how much memory the php script can use.
  2. post_max_size specifies how much data can be loaded to the server via POST.
  3. upload_max_size defines how big a file uploaded to the server can be. post_ and upload_max should therefore both be increased if you get an error message when uploading, or need to upload large files.
  4. Click "Save" to start using the new limits that has been set for PHP on your account.

Change PHP ini settings in cPanel control panel

We have now been through how you can choose which PHP version you want to run .php files with in your web hosting account.