Skip to main content
All CollectionsPHPPHP Versions
How to Check the PHP Version
How to Check the PHP Version

Checking the PHP version of a website, subdomain, or specific folders

Updated over a year ago

The information below doesn't apply to websites created with Hostinger Website Builder 💡

There are several ways to check the PHP version of your website 👇

In the PHP Info Section

To check the PHP version of your website, go to the Websites section and click on Manage next to the website in question. Then, search for PHP Info on the sidebar, and click on it:

Checking the current PHP version of a website

Your current PHP version will be displayed at the top:

Checking the current PHP version of a website

To change it, go to the PHP configuration settings 💡

In the File Manager

A different PHP version can be applied to a specific folder or subdomain.

To check if the change was done correctly:

  1. Access the folder you want to test

  2. Create a new .php file (e.g., phpinfo.php)

  3. Add the following code to the file:

<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

The file will look like this:

Checking the current PHP version of a folder

After this, access this file by the URL: type your domain name, then the folder name, and add the filename. For the file above, the path would be:

https://domain.tld/subdomain/phpinfo.php

The PHP version should be displayed at the top:

Checking the current PHP version of a folder

Changing the PHP version using files is not recommended, as it doesn't include PHP extensions and options. Thus, it might affect the website's work 💡

Did this answer your question?