Supported PHP versions
Currently, the available versions of PHP on our servers are:
The following PHP handlers are supported on our servers:
CGI (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.
By default, newly-opened hosting accounts will be configured to use FPM with OPcache as PHP handler and the latest PHP version currently supported on our servers and widely supported by popular applications. A hosting account will use the PHP version and 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 FPM with OPcache as PHP 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.
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:
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.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|
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 handler 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.