How to check the PHP versions available on your server

Not sure which OS and PHP version your VPS is running on? This KB article will show you how to check the OS installed on your server and how to run other PHP versions in parallel with the standard version.

Step 1: Identify your OS version

To see the CentOS version currently installed on your server, please follow the instructions below:

  1. Login to the Layershift customer control panel
  2. Go to the System section of the main top menu
  3. Click on Server Info
  4. Under the General Info section you’ll see which CentOS version is installed on your server, as in the following example:

OS

Step 2: Check the PHP versions available for your OS

CentOS 7

PHP handlers Updated until
mod_php php-fpm FastCGI
PHP 5.3 - - -
PHP 5.4 (recommended) Yes Yes Yes Jun 2024*
PHP 5.5 - Yes Yes Jun 2016**
PHP 5.6 - Yes Yes Dec 2018
PHP 7 - Yes Yes Nov 2018

* PHP 5.4 on CentOS 7 is a special long-term support release which is fully supported and regularly updated with security and bug fixes backported from newer versions of PHP.
** If you are using PHP 5.5, we strongly recommend changing to PHP 5.4 to benefit from the long-term support. PHP versions that reached the end of life will remain available to existing websites, but security/bug fixes will no longer be applied.

CentOS 6

PHP handlers Updated until
mod_php php-fpm FastCGI
PHP 5.3 (recommended) Yes Yes Yes Nov 2020*
PHP 5.4 - Yes Yes Sep 2015**
PHP 5.5 - Yes Yes Jun 2016**
PHP 5.6 - Yes Yes Dec 2018
PHP 7 - Yes Yes Nov 2018

* PHP 5.3 on CentOS 6 is a special long-term support release which is fully supported and regularly updated with security and bug fixes backported from newer versions of PHP.
** If you are using PHP 5.4 or PHP 5.5, we strongly recommend changing to PHP 5.3 to benefit from the long-term support. PHP versions that reached the end of life will remain available to existing websites, but security/bug fixes will no longer be applied.

CentOS 5

PHP handlers Updated until
mod_php/php-fpm FastCGI
PHP 5.3 (recommended) Yes Yes Mar 2017*
PHP 5.4 - Yes Sep 2015**
PHP 5.5 - Yes Jun 2016**
PHP 5.6 - Yes Dec 2018

* PHP 5.3 on CentOS 5 is a special long-term support release which is fully supported and regularly updated with security and bug fixes backported from newer versions of PHP.
** If you are using PHP 5.4 or PHP 5.5, we strongly recommend changing to PHP 5.3 to benefit from the long-term support. PHP versions that reached the end of life will remain available to existing websites, but security/bug fixes will no longer be applied.

For those customers running a version of PHP not labelled as recommended above, we will routinely install the latest minor version (e.g. 5.5.x, 5.6.x) on our Cloud VPS range, so for stability and to minimise the risk of needing to modify your code we recommend using PHP 5.3 (CentOS 5/6) or 5.4 (CentOS 7) wherever possible (where patches are back-ported for stability), and only using newer versions when you’re an active developer or need the newest functionality.

How to check the PHP version used by a domain

If you are not sure which PHP version is installed by default on your server, please see below for instructions:

  1. Login to your Plesk Panel
  2. Go to Tools and settings in the main top menu
  3. Go to Server Management
  4. Click Server Components
  5. Search for ‘php’ in the search box:

PHP version installed

If you also want to see the additional PHP versions you’ve installed so far:

  1. Go to Websites & Domains
  2. Click on the domain name you want to check
  3. Select Hosting Settings
  4. In the Web scripting and statistics section you’ll find a drop-down menu with all available PHP versions.

PHP version installed

Now that you know the CentOS version of your VPS, here are some technical specifications depending on each Operating System installed on your server.

For more detailed instructions on how to install additional PHP versions please refer to the Installing PHP 5.4 5.5, 5.6 or 7 article.


Note: mod_php and php-fpm handlers are only available for the PHP version installed by default. For all other additional PHP versions you add to your server, you will only be able to execute PHP scripts using FastCGI or CGI.


In case you’re not certain of the differences between mod_php, FastCGI or CGI, don’t worry. We’ve got this covered! Check out our Which PHP mode? Apache vs CGI vs FastCGI blog article and find out the advantages and disadvantages of using a particular PHP handler.

61
1854

Need More Help?

If you're still having problems, get in touch with our 24/7 support team! We'll be more than happy to help.