3 Simple ways of checking your website PHP version

  John Mwaniki /    Updated on 07 Jul 2024

PHP programming language has been through continuous improvements since its inception to this date.

These improvements are regularly done to introduce new features and functionalities, improve efficiency, fix bugs, and eradicate security loopholes.

These fixes and updates come in form of versions, with each version being built upon the previous.

Each new version is actively supported by The PHP Development Team for a period of 2 years, and then an additional one year for critical security fixes only.

This means that after the 3-year support period, the version stops being supported by the development community, and any bugs or security vulnerabilities discovered later won't be fixed.

It is, therefore, advisable to upgrade to a current PHP version that is actively supported.

By using a current version, you are guaranteed security, high performance, support and as well you will be able to add more advanced features to your website as compared to older versions.

But before going ahead and changing the version, you need first to know which version your website/application is currently running on.

In this article, I will show you 3 different ways in which you can check which version your website is currently running on in cPanel.

Checking current PHP version

Below are 3 different ways of doing it:

  • Using phpinfo() function
  • Using MultiPHP Manager
  • Using PHP Selector

1. Using phpinfo() function

This is the simplest of all the methods. All you need to do is echo/print the output of the phpinfo() function as shown below:

<?php
echo phpinfo();
?>

The above code will print out a page full of PHP information for your website/server, including the version as shown below.

Checking php version using phpinfo() function

2. Using MultiPHP Manager

Step 1: Log in to the cPanel account

Step 2: Click on "MultiPHP Manager" under the Software section

cPanel MultiPHP Manager

You will be able to see all your domain name(s) and subdomain(s) listed. The version for each is specified under the PHP version column as shown below:

Checking PHP version with MultiPHP manager in cPanel

3. Using PHP Selector

cPanel allows you to check and manage the PHP version for your website in another way using PHP selector.

Step 1: Log in to your cPanel account

Step 2: Click on "Select PHP version" under the Software section

cPanel PHP selector

You will be taken to a page where you will be able to see the current version as shown below:

PHP selector current version

Conclusion

PHP programming keeps evolving and becoming much better with improved efficiency, more capabilities, and security enhancement.

This evolution comes in form of version releases which are built upon the previous ones and supported by the PHP Development Community for a period of 3 years.

After the 3 year period, the support is terminated. It is therefore important to update the PHP version to a current version for better performance, security, and support.

This brings the need to constantly check the PHP version to be sure your website is running on a supported version.

In this article, you have learned how you can check the PHP version for your website in 3 simple ways.