How to Check the PHP Version in Hostinger

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

Updated 2 weeks 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 Dashboard next to the website in question. Then, search for PHP Info on the sidebar, and click on it:

Hostinger hPanel Advanced menu with PHP Info highlighted below the php info search field

Your current PHP version will be displayed at the top:

Hostinger PHP info page showing highlighted PHP version 7.4.26 code line

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:

phpinfo.php file open in a code editor with phpinfo() highlighted

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:

PHP version 7.4.26 highlighted on a phpinfo page

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 💡

NOTE: If you’re using PHP 8.1 or below, these versions are deprecated and no longer receive security updates. For optimal security and compatibility, we recommend upgrading to PHP 8.2 or PHP 8.3. Learn how to update your PHP version: How to Change the PHP Version of Your Hostinger Hosting Plan