3.3.1 How to change PHP version in the control panel

PHP logo

Supported PHP Versions

Our shared hosting supports various PHP versions, allowing you to run almost any PHP-based website. Additionally, you have the flexibility to use 2 PHP versions within a single account.

At the moment our hosting supports the following versions of PHP:

  • PHP 5.2.17 (with integrated ZendOptimizer and IonCube)
  • PHP 5.3.10 (with integrated ZendGuardLoader and IonCube)
  • PHP 5.4.45 (with integrated ZendGuardLoader and IonCube)
  • PHP 5.5.38 (with integrated ZendGuardLoader and IonCube)
  • PHP 5.6.40 (with integrated ZendGuardLoader and IonCube)
  • PHP 7.0.33 (with integrated IonCube)
  • PHP 7.1.33 (with integrated IonCube)
  • PHP 7.2.34 (with integrated IonCube)
  • PHP 7.3.33 (with integrated IonCube)
  • PHP 7.4.33 (with integrated IonCube)
  • PHP 8.0.30
  • PHP 8.1.29 (with integrated IonCube)(activated by default)
  • PHP 8.2.23 (with integrated IonCube)
  • PHP 8.3.11 (with integrated IonCube)

Current up-to-date version of the IonCube Loader module: 13.3.1

Note: if you use the ISPManager4 panel for other services (virtual/dedicated server), the list of PHP versions supported by your panel will depend on the version of the OS image used on the server. Virtual/dedicated servers do not receive imperative PHP version updates, unlike hosting. If you need a version that is not on the server, but is present on the hosting – contact Support Service.

Changing Operating Mode and Selecting PHP Version

Hosting

Each WWW domain can be in one of three operating modes with PHP:

  • PHP is not supported. PHP is not supported for the domain.
  • PHP as Apache module. All domains in this mode will work on version 5.3.10 regardless of the version installed in the PHP configuration tab.
  • PHP as CGI. All domains in this mode will work on the version installed in the PHP configuration tab.

Changing the PHP version is only available for the PHP as CGI mode. To change the PHP version, you must set PHP to CGI mode in at least one WWW domain.

Change PHP mode

After that, you need to refresh the browser page. In the left menu of the panel, the item PHP configuration will appear. After opening it, you can see the following control form with PHP settings, where the option to select the interpreter version is available.

Selecting the PHP version on TheHost hosting

Only two versions can be used on the hosting – the one installed in PHP configuration for all domains in PHP as CGI mode and version 5.3.10 for all domains in PHP as Apache module mode.

Virtual/Dedicated Server

On a virtual/dedicated server with the ISPManager4 panel, you have access to the root superuser. With it, you can create an unlimited number of regular users, for each of which you can select their own PHP version in the PHP configuration tab. This way, you can use an unlimited number of different PHP versions on one service, which is not available for hosting.

To set the PHP version for a user, you must first log in to it. You can do this in the Users tab, by selecting the desired user with a mouse click and clicking Enter in the upper right corner:

ISPManager4, log in to user

Then change the version using the above algorithm.

If you do not see the option to set the PHP as CGI mode for a specific user on your server, make sure that the user has the appropriate rights. To do this, go to the Users tab again, select the desired user and click Edit. In the Permissions form, check the appropriate box:

ISPManager4, user rights

Using PHP in Command Line

If you want to use PHP in the command line (CLI) or in a CRON job, you need to use the following commands:

  • php-5.2 - PHP version 5.2
  • php-5.3 - PHP version 5.3
  • php-5.4 - PHP version 5.4
  • php-5.5 - PHP version 5.5
  • php-5.6 - PHP version 5.6
  • php-7.0 - PHP version 7.0
  • php-7.1 - PHP version 7.1
  • php-7.2 - PHP version 7.2
  • php-7.3 - PHP version 7.3
  • php-7.4 - PHP version 7.4
  • php-8.0 - PHP version 8.0
  • php-8.1 - PHP version 8.1
  • php-8.2 - PHP version 8.2
  • php-8.3 - PHP version 8.3

Usage example:

  1. php-8.0 /var/www/exampleuser/data/www/examplesite.com.ua/script.php