Hosting

How to check PHP version and configuration

How to check PHP version and configuration

There are two ways to check PHP version set for the account. By default, we have PHP 5.6 set on our shared servers.
To check what PHP version is selected for your account go to cPanel Software section > Select PHP version menu:

How to check PHP version and configuration
You will see the current PHP version above PHP extensions:

How to check PHP version and configurationAnother way to check PHP version is PHPinfo() function, commonly used to check the current state of PHP configuration. It can also be used for debugging purposes as it contains all EGPCS (Environment, GET, POST, Cookie, Server) data.

for cPanel Basic theme:

1. Log into your cPanel account, go to Files section > File Manager menu:

How to check PHP version and configuration

2. Navigate to public_html directory, click on New File and create a phpinfo.php file:

How to check PHP version and configuration

How to check PHP version and configuration

3. Find the newly created file in the list and click on Code Editor:

How to check PHP version and configuration

4. Add the lines of the code provided below to the file and click on Save Changes:

<?php
phpinfo();
?>

How to check PHP version and configuration

5. To see the detailed information about PHP configuration of your account, open http://yourdomain.com/phpinfo.php link in your browser, replacing yourdomain.com with your main domain name.

NOTE: For security reasons, do not forget to delete the file once you check all the necessary information.

for cPanel Retro theme:

1. Log into your cPanel account, go to the section Files File Manager menu:

How to check PHP version and configuration

2. Navigate to the public_html directory, click on New File and create a phpinfo.php file:

How to check PHP version and configuration

3.Find the newly created file in the list and click on Code Editor:

How to check PHP version and configuration

4. Add the lines of the code provided below to the file and click on Save Changes:


<?php
phpinfo();
?> 

How to check PHP version and configuration

5. To see the detailed information about PHP configuration of your account, open http://yourdomain.com/phpinfo.php link in your browser, replacing yourdomain.com with your main domain name.

NOTE: 
For security reasons, do not forget to delete the file once you check all the necessary information.

That’s it!