How can i install php version in cpanel?

This article describes how to change the PHP version and additional PHP settings in cPanel.

Changing the PHP version

A2 Hosting servers support multiple versions of PHP. To change the PHP version used for your account, follow these steps:

  1. Log in to cPanel.

    If you do not know how to log in to your cPanel account, please see this article.

  2. Open the PHP Selector:
    • If you are using the Jupiter theme, on the Tools page, in the Software section, click Select PHP Version:

      How can i install php version in cpanel?

    • If you are using the Paper Lantern theme, in the SOFTWARE section of the cPanel home page, click Select PHP Version:

      How can i install php version in cpanel?

    If you do not see the Select PHP Version icon, your server does not support this feature. 

  3. cPanel displays the current PHP version. To change the PHP version, in the Current PHP Version list box, select the version that you want to use, and then click Set as current. The new PHP version takes effect immediately.

Changing PHP settings

In addition to changing the PHP version from cPanel, you can change various PHP settings. You can enable and disable PHP extensions, as well as configuration directives such as allow_url_fopen, error_log, and many more.

This feature removes the need to configure and maintain custom php.ini files. Instead, you control all PHP settings directly from cPanel.

To change your PHP settings, follow these steps:

  1. Log in to cPanel.

    If you do not know how to log in to your cPanel account, please see this article.

  2. Open the PHP Selector:
    • If you are using the Jupiter theme, on the Tools page, in the Software section, click Select PHP Version:

      How can i install php version in cpanel?

    • If you are using the Paper Lantern theme, in the SOFTWARE section of the cPanel home page, click Select PHP Version:

      How can i install php version in cpanel?

    If you do not see the Select PHP Version icon, your server does not support this feature. 

  3. On the Extensions tab, select which extensions you want to enable for the current PHP version:

    • To enable an extension, select the check box next to the extension name.
    • To disable an extension, clear the check box next to the extension name.

      How can i install php version in cpanel?

    • Selections are saved automatically.

    To reset the extension list to the default configuration, click Reset to default in the top right corner.

  4. To change settings for the current PHP version:

    • Near the top of the page, click the Options tab.
    • Click the value next to the setting that you want to modify.
    • Depending on the type of setting, a list box may appear with predefined settings that you can choose. Or, a text box may appear so you can type the value:

      How can i install php version in cpanel?

    • Changes are saved automatically, and take effect immediately.

    When you modify a setting, a Reset to default link appears beneath the setting label. Click the link to change the setting back to the default value.

How to manage the PHP version in cPanel using the Select PHP Version tool

Select PHP Version or the PHP Selector enables each user on the server to have it's own, fully customisable and flexible PHP environment.

It allows the user to switch between different PHP Versions, such as PHP 5.2, PHP 5.3, PHP 5.6, PHP 7.0, PHP 7.1 as well as enable more than 120 PHP extensions and modules, like APC, MySQLi, GD, PDO, SOAP and etc., entirely based on the user's needs.

Now, let's learn how to do that ourselves!

Step 1: Login to your cPanel

How can i install php version in cpanel?

Step 2: Click on the Select PHP Version tool under Software:

How can i install php version in cpanel?

Step 3: Select the desired PHP version from the drop down list, then click on Set as current and Save the change:

How can i install php version in cpanel?

That's it! The new PHP version is already enabled for your user.

If you want to enable or disable a PHP module, just select it or deselect it from the list and click on Save.

You can also change the PHP options, by clicking on the Switch To PHP Options button:

How can i install php version in cpanel?

Here you can manage the PHP options, such as the allow_url_fopen, max_execution_time, memory_limit, upload_max_filesize and others:

How can i install php version in cpanel?

Make sure to click on the Save button at the bottom, in order to save your configuration!

Should you need any further assistance, please do not hesitate to contact us.

How do I enable PHP version in cPanel?

How to manage the PHP version in cPanel using the Select PHP Version tool.
Step 1: Login to your cPanel..
Step 2: Click on the Select PHP Version tool under Software:.
Step 3: Select the desired PHP version from the drop down list, then click on Set as current and Save the change: That's it!.

How do I install a specific version of PHP?

Introduction.
Ensure the php packages for the version you want are installed..
Update any configuration for that PHP version..
Update your web server configuration to point to the correct PHP version..
Point PHP CLI to the correct PHP version..
Restart your web server and php-fpm..
Mask the old php-fpm daemon..

How do I check my PHP version in cPanel?

Viewing Your PHP Version in cPanel.
Log into cPanel..
Under General Information on the right panel, click Server Information..
Under the Item column, find PHP Version..
In the Detail column, note the version number..

What is PHP version in cPanel?

The cPanel default profile includes PHP versions 7.4 and PHP 8. EasyApache 4 supports PHP versions 5.4 through 5.6, PHP versions 7.0 through 7.4, and PHP 8.0 through 8.1.