Supported PHP versions
Currently, the available versions of PHP on our servers are:
PHP 8.4
PHP 8.3
PHP 8.2
PHP 8.1 (default)
PHP 8.0
PHP 7.4
PHP 7.3 (obsolete)
PHP 7.2 (obsolete)
PHP 7.1 (obsolete)
PHP 5.6 (obsolete)
PHP 5.3 (obsolete)
Supported PHP handlers
The following PHP handlers are supported on our servers:
CGICGI (Common Gateway Interface) allows a web server to work with external programs such as PHP scripts. Compared to FPM, CGI is slower and consumes more server resources, but some scripts may need to run as CGI for compatibility reasons.
FPM with OPcache (recommended)FPM (FastCGI Process Manager) uses the FastCGI protocol that allows CGI programs to work with a web server. FPM maintains workers that handle PHP requests to reduce the overhead related to the communication between the web server and CGI programs, resulting in faster PHP execution. It is paired with OPcache - a caching system that keeps pre-compiled script bytecode in the server memory which further improves PHP performance. On our servers, there are two FPM with OPcache handler setups available:• FPM with max OPcache memory - This handler has the recommended maximum amount of memory for storing cached data by OPcache, which makes it the perfect solution for heavy websites that get a lot of traffic/visitors. For plans with dedicated memory (e.g. WebApps-enabled plans), the maximum memory limit can be modified with the opcache.memory_consumption setting in the website's PHP configuration file. More details on the process of changing PHP settings are available in our Changing PHP settings article.• FPM with default OPcache memory - This handler has a default memory allocation for OPcache. It still offers great PHP performance and should be sufficient for most websites.
Default PHP version and handler
By default, newly-opened hosting accounts will be configured to use the PHP handler that offers the best performance and the latest PHP version that is currently supported on our servers and is widely supported by popular applications. A hosting account will use the PHP version and PHP handler it was initially opened with, unless you change them manually. So, if your account was opened when PHP 7.3 was the default PHP version and CGI was the default PHP handler, it will stay with these settings until you change them.
The default PHP version and handler for newly-created subdomains are handled in the same manner - they will be configured automatically to use the latest PHP version currently supported on our servers and the fastest available PHP handler. The FPM with max OPcache memory PHP handler can be enabled only for a set number of websites depending on the hosting plan. If the account reaches this limit, the new default PHP handler for the account will become FPM with default OPcache memory. If you would like to use the FPM with max OPcache memory PHP handler for more websites, you should contact your hosting provider to check the available upgrade options.
Changing the PHP version/handler
You can change the default PHP version and handler for each subdomain in your account through the Control Panel -> PHP Settings section by selecting the desired PHP version and/or handler next to the subdomains where you want to change the PHP version and/or handler. To save your changes, click on the Save Changes button.
If you wish to adjust specific settings for the PHP interpreter, please refer to the PHP Settings article from our online documentation.
PHP version for the command line PHP binary
By default, the command line PHP binary (php.cli) will use the latest PHP version available on our servers when your account was opened. In some rare cases, due to legacy settings, an account may be configured with an older PHP version for php.cli.
You can view or change the default PHP version for php.cli for your account via the PHP CLI version subsection of the hosting Control Panel -> PHP Settings section.
A list showing the paths to the command line PHP binary files for all PHP versions supported for your account are available in the hosting Control Panel -> System Information section. You can use these PHP binary files to execute scripts using a specific (non-default PHP version for your account) for php.cli via cron jobs or the command line.
For example, if you wish to execute the ~/www/www/directory/file.php script using PHP 7.2 via the command line or a cron job, you should use the following command:
/usr/local/bin/php72.cli ~/www/www/directory/file.php
Changing the PHP version for a certain folder only
The information in this section applies only to subdomains using the CGI PHP handler.
More information on the precedence of PHP configuration files is available in our PHP configuration files and priority article.
Note: If you wish to change the PHP version for a subdomain altogether, please refer to the Changing the PHP version/handler section from this article.
You can "hard code" certain folders to use a particular version of PHP for subdomains using CGI as PHP handler by adding a directive to an .htaccess file (you can create that file if it doesn't exist) in that folder. The table listed below shows the exact directives you need to use for each of the PHP versions supported on our servers:
PHP version .htaccess directive
PHP 8.4
AddHandler application/x-httpd-php84 .php
PHP 8.3
AddHandler application/x-httpd-php83 .php
PHP 8.2
AddHandler application/x-httpd-php82 .php
PHP 8.1
AddHandler application/x-httpd-php81 .php
PHP 8.0
AddHandler application/x-httpd-php80 .php
PHP 7.4
AddHandler application/x-httpd-php74 .php
PHP 7.3
AddHandler application/x-httpd-php73 .php
PHP 7.2
AddHandler application/x-httpd-php72 .php
PHP 7.1
AddHandler application/x-httpd-php71 .php
PHP 5.6
AddHandler application/x-httpd-php56 .php
PHP 5.3
AddHandler application/x-httpd-php53 .php
Obsolete PHP versions
PHP 5.3, PHP 5.6, PHP 7.1, PHP 7.2, and PHP 7.3 are in end-of-life status, and there are no security releases for them. That is why we may stop supporting these versions on our servers at any time. We strongly advise any user running an obsolete PHP version to update to a newer PHP version as soon as possible. Please note that the PHP 5.3 and PHP 5.6 branches on our servers may not come with all standard PHP extensions due to server software compatibility issues.
PHP 5.3 is available only for the CGI PHP handler. It is not available for the FPM with OPcache PHP handlers due to performance and security concerns.
For additional information on switching from PHP 5.3 to a newer version, you can check the Common problems when switching from PHP 5.3 to PHP 5.6 article.