Independent hosting research · no paid rankings

Desk checked

Setup Basics

How to find out which version of Hypertext Preprocessor you are using

Published: Last checked:

Find the exact Hypertext Preprocessor version on a live site via hosting panels, Site Health, phpinfo, command line, VPS, or local stacks.

A live website must be checked in the environment serving its visitors. A hosting panel, WordPress Site Health, a phpinfo() page, a command line, a VPS PHP-FPM handler, and a local stack can report different PHP versions. This guide uses the source testing facts from October 22, 2026, published October 26, 2026.

Factual summary

The source tested five main methods on a Hostinger Unlimited web hosting plan with WordPress 7.1.3, a CloudPanel VPS running Ubuntu 22.04, and a Mac. PHP (Hypertext Preprocessor) is server-side, so the version running a site is chosen by the server, not a browser.

A version such as 8.3.35 has two parts: 8.3 is the branch, which sets features and support dates, and 35 is the release, which increases with bug and security fixes. Before switching from an outdated version, confirm the site supports a newer version, such as 8.4, and compare it with versions that still receive security fixes and with the host's security notices.

Method comparison

MethodWhat it checksExact release?Key limitation
Hosting control panelPHP selected for the websiteHostinger PHP Info: yes; cPanel: branch onlyMenus differ; cPanel omits build date
WordPress Site HealthPHP loading the dashboardYesAdmin access needed; no build date
phpinfo() filePHP serving the file's folderYesRisky if left online; host may disable it
SSH or terminalcommand-line PHPYesMay differ from website PHP
VPS PHP-FPM settingsnginx handlerYes if checkedRequires reading server settings
Local stackPHP shipped with XAMPP, MAMP, or DockerYesSeparate from live site

Hosting control panels and cPanel

In Hostinger dashboard, open Websites, click Dashboard, then go to Advanced to PHP Info or search for PHP Info. PHP Version appears at the top, and Build Date appears a few rows below. This works for every website on the plan except those built with Hostinger AI Builder.

PHP Configuration shows only the selected branch, such as PHP 8.3. Use PHP Info when the exact release and build date matter, such as confirming a security fix reached the site. For WordPress sites, WordPress to Overview shows the branch on the PHP Version card without opening the WordPress admin dashboard. If Hostinger recommends a newer version, the card shows it with a Change button.

In cPanel, look under Software to MultiPHP Manager or Software to Select PHP Version. MultiPHP Manager lists each domain next to its PHP version. Inherited means the domain takes its version from an .htaccess settings file in its folder or a parent folder, or uses the server default when no file sets one.

Select PHP Version shows the version selected for the cPanel account in the Current PHP version dropdown. A domain uses it only when its MultiPHP Manager setting matches the server default. Hostinger cPanel hosting uses this tool, which comes with CloudLinux. Both tools list branches, such as 8.3, and neither shows a build date. For the exact release, open a phpinfo() file in the website folder.

WordPress Site Health

In WordPress, log in with an administrator account, because only administrators can open Site Health. Go to Tools to Site Health, open Info, expand Server, and find the PHP version row. It shows the exact release, such as 8.4.26, but not the build date.

The PHP SAPI row confirms how PHP connects to the web server, such as litespeed or fpm-fcgi. Site Health reads values from the PHP loading the dashboard, so they match the live website tested. The Status tab can flag outdated PHP versions and list a version that no longer receives security updates as a critical issue.

WP-CLI, WordPress' command-line tool, reports different PHP: its wp cli info command shows the PHP WP-CLI runs on. On the test site, command-line PHP was 8.3.35, while Site Health showed 8.4.26.

phpinfo() and command line checks

phpinfo() is a built-in PHP function that prints PHP settings. Use it when a panel does not show PHP information, or when a folder or subdomain runs its own version. Open the website folder, such as public_html, in File Manager or an FTP client, create a one-line PHP file with random characters in its name, such as info-7f3k.php, and avoid common names like info.php because scanners look for them. Open https://domain.tld/info-7f3k.php in a browser, replacing domain.tld with the domain, and check PHP Version and Build Date. Delete the file after the check. If a simplified page shows only a version such as 8.3.35 without server settings, delete that file too.

The phpinfo() page can show folder paths, installed add-ons, and server settings that may include passwords, and attackers use exact version details to find servers that lack security fixes.

On a server or local computer, run php -v in a terminal. The first line shows the version, how PHP is running, and the build date, for example, PHP 8.3.35 (cli) (built: Oct 21 2026 00:00:00). The cli value means command-line interface, the PHP program the terminal runs.

On Hostinger web hosting, SSH gives an encrypted command line on the server. Enable SSH Access in the website sidebar and copy the IP address, port, and username shown there. If SSH Access is not enabled, the connection can close after the password prompt with "/sbin/nologin: No such file or directory." php -v and php -r check only command-line PHP. Composer, which installs PHP code libraries, WP-CLI, and scheduled tasks that run PHP commands can use this PHP.

The website does not necessarily use the same PHP. A separate PHP handler serves visitors by running PHP for the web server, and tasks triggered through a web address use it too. Examples include PHP-FPM, short for FastCGI Process Manager, and LiteSpeed Web Server's own PHP, which Hostinger web hosting uses. The handler and CLI are separate programs, so each can run its own version. Servers often keep several versions side by side: the CloudPanel VPS had 10, and the Hostinger web hosting server had 17. On Debian and Ubuntu, listing PHP settings folders and running a version by name can confirm installed versions.

During testing, php -v over SSH on Hostinger did not follow PHP Configuration. After switching a Unlimited web hosting site to PHP 8.4, the site ran 8.4.26, but php -v returned 8.3.35, even in a new SSH connection 10 minutes later. To run another version, use its full folder path; folders in /opt/alt list extra PHP versions. The PATH command export PATH= puts that folder first in PATH, replacing php84 with the branch. Composer followed it, but tools tied to one PHP file may not. Run php -v to confirm.

VPS, PHP-FPM, and local stacks

These steps apply to Debian or Ubuntu servers where nginx connects to PHP-FPM on the same machine. On a VPS that runs PHP-FPM, find which PHP-FPM address the site's nginx settings point to, then run that version with -v. That version, not command-line PHP, runs the website. The sudo prefix runs a command with administrator rights.

Search nginx settings for the fastcgi_pass line. The result is either a socket file, such as /run/php/php8.3-fpm.sock, or a local address and port, such as 127.0.0.1:15001. A socket file lets nginx and PHP-FPM talk on the same machine. Some setups use a server name or a group of servers. If the first command returns nothing, run sudo nginx -T to print all nginx settings and find the fastcgi_pass line. That can happen when the configuration file is outside /etc/nginx/sites-enabled.

Match the address to a PHP-FPM version. For a socket, default names on Debian and Ubuntu include the branch, such as php8.3-fpm.sock. For a port, inspect the process listening on the port, replacing 15001 with the port number. The process name shows the branch when it includes a version, such as php-fpm8.0. If the name has no version or the socket is custom, check the site with a phpinfo() file.

To see the version pages actually run on, open a phpinfo() file in the site folder. On the test VPS, which runs CloudPanel, php -v returned 8.2.31, while the website ran on PHP-FPM 8.0.30, a branch that no longer receives security fixes from the PHP project.

In a local development environment, run php -v with the PHP program that comes with the local stack. For XAMPP, this may be C:\xampp\php\php.exe -v. XAMPP, MAMP, and Docker containers set up for PHP each have their own copy, separate from PHP installed elsewhere on the computer. In Windows Command Prompt, php -v checks the default command-line PHP, and where php shows which php.exe is used.

Pros, cons, and limitations

Hosting control panels are quick and need no code. Hostinger PHP Info gives the exact release and build date, while cPanel tools mainly show branches. WordPress Site Health shows the exact release, but it requires administrator access and omits the build date.

A phpinfo() file is flexible, but it exposes sensitive settings if left online. SSH and php -v are precise for CLI PHP, but they can mislead when the website uses PHP-FPM or LiteSpeed. VPS PHP-FPM checks reveal the handler serving the site, but they require reading nginx settings. Local stack checks are useful before deployment, but they do not prove the live site's version.

Before switching from an outdated version, confirm the site supports a newer version, such as 8.4. If a panel, terminal, and browser show different values, trust the check that runs in the environment serving the website.

Sources and official specs

This article is based on the supplied testing notes dated October 22, 2026, and the published date October 26, 2026. Environments and products named in the source include Hostinger Unlimited web hosting, WordPress 7.1.3, cPanel, CloudLinux, CloudPanel VPS, Ubuntu 22.04, Debian, nginx, PHP-FPM, LiteSpeed Web Server, Composer, WP-CLI, XAMPP, MAMP, Docker, and a Mac.

Last updated: October 26, 2026.

Spec tagsVPSHypertext PreprocessorPHP versionphpinfoWordPress Site Health

Reader notes 0

  • No notes yet. Corrections and first-hand test results are welcome.