How to check your PHP version

Hostinger Tutorials by 18 min read 78x views
How to check your PHP version

Share Post

Oct 26, 2026

/

By Bruno S.

/

11 min Read

To inspect your PHP version, open your hosting authority panel or WordPress Site Health for a live website, or run the php -v command in a terminal on a server or your own computer. There are five chief methods.

  • Hosting authority panel. Open the PHP data page, specified as PHP Info in Hostinger dashboard.
  • WordPress. Go to Tools → Site Health → Info → Server.
  • phpinfo() file. Upload a one-line PHP document to your location and open it in a browser.
  • Command line. Run php -v in a terminal (the app anywhere you category commands).
  • Local betterment environment. Run the PHP program that comes alongside your local tools.

Your live website, a server you oversee remotely, and your own device all have their own PHP, and the type a terminal shows doesn’t continually equivalent the one serving your site.

Once you cognize your version, difference it alongside the PHP versions that motionless obtain safety fixes and alongside your host’s safety notices. Confirm that your location supports a newer version, specified as 8.4, before you toggle distant from an outdated one.

We tested all method on October 22, 2026, on a Hostinger Unlimited web hosting scheme alongside WordPress 7.1.3, a CloudPanel virtual personal server (VPS) operating Ubuntu 22.04, and a Mac.

How to inspect your PHP type in a hosting authority panel

To inspect your PHP type in a hosting authority panel, open the PHP data or PHP type page for your website. The list name and location depend on your hosting provider and panel, so appearance for a dedicated PHP leaf or the PHP settings of all website.

Control panels peruse the type direct from the hosting server because PHP (Hypertext Preprocessor) is a server-side scripting tongue that runs on the server, not in your visitor’s browser. This makes the panel a quick inspect that needs no code or commands.

Whichever panel you use, the type figure has two parts. In 8.3.35, 8.3 is the branch, which sets the features and assistance dates, and 35 is the release, which increases alongside all circular of bug and safety fixes.

Hostinger dashboard and cPanel (a third-party panel) keep the type in distinct menus.

Check your PHP type in Hostinger dashboard

In Hostinger dashboard, go to the PHP Info section of your website management, and the PHP type appears at the top of the page. You can check the PHP type in Hostinger this way for all website on your plan, apart from those built alongside Hostinger AI Builder.

  1. Open Websites and click Dashboard next to your site.
  2. In the sidebar, go to Advanced → PHP Info, or category PHP Info in the sidebar search.
  3. Check PHP Version at the top of the page. A few rows below, Build Date shows whenever this copy of PHP was built.
Hostinger dashboard PHP Info leaf showing PHP Version 8.3.35 and a Build Date of Oct 21 2026

In the identical Advanced menu, PHP Configuration shows lone the branch you selected, specified as PHP 8.3. Use PHP Info whenever you need the exact publish and build date, for example, to verify that a safety fix reached your site.

For WordPress sites, WordPress → Overview shows the branch on the PHP Version card, so you can inspect it without beginning the WordPress admin dashboard. When Hostinger recommends a newer version, the cardstock shows it alongside a Change button.

See how to inspect and alter your PHP type in Hostinger dashboard in this video:

youtube conduit logo

Subscribe For additional instructional videos! Hostinger Academy

Check your PHP type in cPanel

In cPanel, inspect your PHP type under Software → MultiPHP Manager or Software → Select PHP Version, depending on which tool your hosting provider enables.

  • MultiPHP Manager. Lists all domain in your document next to its PHP version. Inherited method the domain takes its PHP type from an .htaccess settings document in its directory or a genitor folder. The domain uses the server’s default whenever no document sets one.
  • Select PHP Version. Shows the PHP type selected for your cPanel document in the Current PHP version dropdown menu. A domain uses this type lone whenever its MultiPHP Manager environment matches the server’s default. Hostinger’s cPanel hosting uses this tool, which comes alongside the CloudLinux server functioning system.

Both tools catalog versions by branch, specified as 8.3, and neither shows a build date. For the exact release, open a phpinfo() document in the website’s folder.

How to inspect your PHP type in WordPress

To inspect your PHP type in WordPress, open Site Health from the Tools menu, anywhere the Server division lists the PHP type that runs your site. We tested these steps on WordPress 7.1.3.

  1. Log in to the WordPress admin dashboard alongside an director account, since lone administrators can open Site Health.
  2. Go to Tools → Site Health and open the Info tab.
  3. Expand the Server division and discover the PHP version row.
WordPress Site Health Info tab alongside the Server division showing PHP type 8.4.26 and PHP SAPI litespeed

The PHP version row shows the exact release, specified as 8.4.26. It doesn’t display the build date, so use PHP Info or a phpinfo() document whenever you need it.

Site Health says these values from the PHP that loads your dashboard, so they equivalent your live website. The PHP SAPI row confirms it by naming the Server Application Programming Interface (SAPI), which is how PHP connects to your web server, specified as litespeed or fpm-fcgi.

The Status tab on the identical display additionally flags outdated PHP versions and lists a type that no longer receives safety updates as a crucial issue.

WP-CLI, WordPress’ command-line tool, reports a distinct PHP: its wp cli info command shows the PHP WP-CLI runs on. On our test site, the command-line PHP type was 8.3.35, during Site Health showed 8.4.26.

How to inspect your PHP type in a web browser using phpinfo()

To inspect your PHP type alongside phpinfo(), upload a one-line PHP document to your website’s directory and open it in a browser. The PHP Version row sits at the top of the page.

phpinfo() is a built-in PHP function that prints your PHP settings. It plant on any presenter that lets you upload and run PHP files, unless the presenter turns the function off. Use it as a fallback whenever your hosting panel doesn’t display PHP information, or whenever you need to inspect a directory or subdomain that runs its own PHP version.

  1. Open your website’s folder, specified as public_html, in your host’s File Manager or a File Transfer Protocol (FTP) client.
  2. Create a phpinfo file and add random characters to its name, specified as info-7f3k.php. Avoid average names akin info.php or phpinfo.php, since automated scanners appearance for them.. Add this code:
<?php phpinfo()
  1. Open https://domain.tld/info-7f3k.php in your browser, replacing domain.tld alongside your domain.
  2. Check PHP Version at the top and Build Date in the array under it.
  3. Delete the file.

Warning

Delete the phpinfo document as shortly as you finish. The leaf shows directory paths, installed add-ons, and server settings that can contain passwords, and attackers use exact type particulars to discover servers that deficiency safety fixes.

<?php echo PHP_VERSION;

The leaf afterward shows a sole line, specified as 8.3.35, without your server’s settings. Delete this document following the inspect as well.

How to inspect your PHP type using SSH or the command line

To inspect your PHP type using Secure Shell (SSH) or the command line, run php -v in a terminal on your device or in an SSH meeting on your server:

php -v

The archetypal row of the output 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). Here, cli stands for command-line interface (CLI), the PHP program your terminal runs.

On a distant server, nexus through SSH first, which gives you an encrypted command row on that server. On Hostinger web hosting, hunt for SSH Access in your website’s sidebar, rotate it on, and copy the IP address, port, and username shown there.

Then nexus from your terminal, replacing the placeholders alongside those values, and run php -v:

ssh -p port-number username@server-ip

Turn on SSH Access before connecting; otherwise, the association closes correct following you act your password alongside the communication “/sbin/nologin: No specified document or directory.” We ran into this during testing, and enabling SSH Access fixed it.

To imprint lone the type number, for example in an automated task, use this command instead:

php -r 'echo PHP_VERSION, PHP_EOL;'

Both php -v and php -r inspect lone the command-line PHP. Tools akin Composer (which installs PHP code libraries) and WP-CLI use the identical PHP, as do scheduled tasks that run a PHP command.

Your website doesn’t necessarily use the identical PHP. A distinct program called a PHP handler serves your website’s visitors by operating PHP for your web server. Tasks triggered through a web location use it too.

Examples contain PHP-FPM (short for FastCGI Process Manager) and the LiteSpeed Web Server’s own PHP, which Hostinger web hosting uses. The handler and the CLI are distinct programs, so all runs its own PHP version.

Servers frequently keep multiple PHP versions flank by side: our CloudPanel VPS had 10, and our Hostinger web hosting server had 17. On Debian and Ubuntu (two Linux systems for servers), catalog the PHP settings folders, afterward run a particular type by name to verify it’s installed:

ls /etc/php php8.4 -v

Important

On Hostinger web hosting, php -v complete SSH didn’t prosecute the type selected in PHP Configuration during our test. After we switched a Unlimited web hosting location to PHP 8.4, the location ran 8.4.26, but php -v returned 8.3.35, equal in a new SSH association 10 minutes later.

To run a particular type on Hostinger web hosting, use its complete directory path. The folders in /opt/alt catalog the additional PHP versions installed on the server:

ls /opt/alt | grep php /opt/alt/php84/usr/bin/php -v

To use another type in this SSH session, run export PATH=/opt/alt/php84/usr/bin:$PATH, replacing php84 alongside your branch. This puts that directory archetypal in PATH (the catalog of folders your terminal searches for programs). Composer followed it in our test, but tools tied to one PHP document won't. Run php -v to confirm.

Check the PHP type your web server uses on a VPS

On a VPS that runs PHP-FPM, find which PHP-FPM type your site’s web server settings item to, afterward run that type alongside -v to see its exact release. That version, not the command-line PHP, runs your website.

This matters on servers alongside multiple PHP versions installed. On our test VPS, which runs the CloudPanel authority panel, php -v returned 8.2.31, during the website ran on PHP-FPM 8.0.30, a branch that no longer receives safety fixes from the PHP project.

These steps use to Debian or Ubuntu servers anywhere the nginx web server connects to PHP-FPM on the identical machine, as in our test VPS.

  1. Find which PHP-FPM location nginx uses by searching your site’s nginx settings for the fastcgi_pass line. The sudo prefix runs a command alongside director rights:
sudo grep -RHn '^[[:space:]]*fastcgi_pass' /etc/nginx/sites-enabled/

The outcome is either a socket file, specified as /run/php/php8.3-fpm.sock, or a local location and harbor number, specified as 127.0.0.1:15001. A socket document is how nginx and PHP-FPM conversation on the identical machine. Some setups use a server name or a collection of servers instead.

Run sudo nginx -T to imprint all nginx settings and discover your site’s fastcgi_pass row if the archetypal command returns nothing for your site. That happens whenever the configuration document is located exterior /etc/nginx/sites-enabled.

  1. Match that location to a PHP-FPM version. For a socket, the default names on Debian and Ubuntu contain the branch, specified as php8.3-fpm.sock. For a port, run this command, replacing 15001 alongside your harbor number:
sudo ss -ltnp 'sport = :15001'

The procedure name in the outcome shows your branch whenever it includes a version, specified as php-fpm8.0. Check the location alongside a phpinfo() document alternatively if the name has no type or your socket has a tradition name.

  1. Check the exact publish of the installed PHP-FPM program:
php-fpm8.0 -v
Terminal on a VPS showing php -v returning PHP 8.2.31 for the command row and php-fpm8.0 -v returning PHP 8.0.30

These commands peruse the server’s settings and installed programs. To see the type your pages really run on, open a phpinfo() document in the site’s folder.

How to inspect your PHP type in a local betterment environment

In a local betterment environment, run php -v alongside the PHP program that comes alongside your local stack (the tools that run websites on your computer), specified as C:\xampp\php\php.exe -v for XAMPP. XAMPP, MAMP, and Docker containers set up for PHP all arrive alongside their own copy, distinct from any PHP installed on the remainder of your computer.

Environment

Command

Notes

Windows, Command Prompt

php -v

where php shows which php.exe runs

Windows, PowerShell

php -v

Use where.exe php, since where is a shortcut for a distinct command in PowerShell

macOS and Linux

php -v

which php shows which PHP runs

XAMPP on Windows

C:\xampp\php\php.exe -v

Path for the default facility folder

MAMP on macOS

/Applications/MAMP/bin/php/php8.3.9/bin/php -v

Replace php8.3.9 with a directory from /Applications/MAMP/bin/php

Docker

docker create exec app php -v

Replace app with the assistance name from your Docker Compose document to inspect PHP inner the operating receptacle (Docker’s secluded surroundings for your app)

A “command not found: php” communication on macOS, or “‘php’ is not recognized as an inner or external command” on Windows, method PHP isn’t installed or its directory isn’t in your PATH.

According to the PHP manual’s macOS facility page, macOS hasn’t included PHP since macOS 12 Monterey. Our test Mac returned the identical “command not found” message.

A local type tells you nothing concerning the PHP on your live website. Check the hosting flank separately before you publish code that needs a newer branch.

Which PHP type is your website really using?

Your website uses the PHP type your web server runs, which is the one your hosting panel, WordPress Site Health, or a phpinfo() document shows, not continually the one php -v reports.

Each surroundings needs its own check:

  • A live website. Use your hosting panel, WordPress Site Health, or a phpinfo() file.
  • A server you manage. Run php -v for the CLI, afterward inspect the PHP handler configured for your website, specified as PHP-FPM.
  • Your computer. Run the PHP program from your local stack, specified as XAMPP’s php.exe.

Only three methods display the two the exact publish and the build date, the two particulars that assistance you verify a safety fix.

Method

What it reports

Exact release

Build date

Hostinger dashboard, PHP Configuration

The branch you selected

No

No

Hostinger dashboard, WordPress → Overview

The selected branch and any recommended update

No

No

Hostinger dashboard, PHP Info

The PHP type set for your hosting plan

Yes

Yes

cPanel, Select PHP Version or MultiPHP Manager

The type per document or domain

No

No

WordPress Site Health

The PHP operating your WordPress location and its SAPI

Yes

No

phpinfo() file

The PHP serving that directory and its handler

Yes

Yes

php -v

The command-line PHP

Yes

Yes

In our Hostinger web hosting test, three checks reported PHP 8.3.35 alongside the identical build date, but all used a distinct server API.

SSH showed Command Line Interface, the dashboard’s PHP Info showed CGI/FastCGI, and the phpinfo() document showed lsapi V8.3 CloudLinux 1.3, which is LiteSpeed’s connection. Of these three, lone the phpinfo() document went through the identical association as your visitors, making it the closest inspect of how your live location runs.

Why does the PHP build matter for safety patches?

The PHP build matters since a safety fix doesn’t continually lift the type number. so On Hostinger and Ubuntu, the build date or installed bundle type is the lone sign that a fix is in place. Compare them alongside the safety notice from your presenter or your server’s functioning scheme vendor.

For example, PHP2Shell is the name for two crucial PHP safety flaws disclosed on October 21, 2026. The community Common Vulnerabilities and Exposures (CVE) catalog tracks them as CVE-2026-109618 and CVE-2026-109619.

According to the PHP project’s safety advisory, PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35 fix the two flaws, and all PHP facility that serves web pages is at hazard until it runs a fixed build.

On Hostinger web hosting, the build date is the item to check. Our test location ran PHP 8.3.35, one publish below the PHP project’s fix, and its Build Date peruse Oct 21 2026, the day the PHP project released the fix. The server’s PHP 8.4.26 build showed the identical date.

According to Hostinger’s PHP2Shell update, managed hosting received the fix in all existing version, and a build date of October 21, 2026, or afterward confirms this.

Ubuntu’s own PHP packages activity the identical way. It installs application as packages, and Ubuntu’s PHP2Shell notice lists the fixed bundle for Ubuntu 24.04 as type 8.3.6-0ubuntu0.24.04.13, so php -v on a patched server motionless shows 8.3.6.

To verify a fix in a Debian or Ubuntu package, difference its complete version, shown by dpkg-query -W php8.3-fpm, alongside your vendor's safety notice. You can additionally hunt its alter log for the two CVE IDs alongside zgrep -E "CVE-2026-(109618|109619)" /usr/share/doc/php8.3-common/changelog.Debian.gz.

This command lists newer PHP packages accessible from your application sources on a Debian or Ubuntu server you manage. The catalog doesn’t say which updates merge a fix, so difference their versions alongside the safety notice:

sudo apt update && apt catalog --upgradable 2>/dev/null | grep php

Package versions depend on anywhere your server gets PHP. Ubuntu’s own packages keep the first type number, during third-party bundle sources frequently use the PHP project’s numbers.

On our CloudPanel VPS, the catalog showed 8.2.35, 8.3.36, 8.4.27, and 8.5.12 waiting to be installed. Those are the PHP project’s fixed releases. Nothing appeared for the website’s PHP 8.0.

After installing an update, restart PHP-FPM so its operating processes burden the new build, replacing 8.3 alongside your branch:

sudo systemctl restart php8.3-fpm

Then inspect the type through your website again, since php -v solitary doesn’t verify what your pages run on.

What to do if your PHP type is outdated

To update an outdated PHP version, verify that your location supports a newer branch, afterward switch to a branch that motionless receives safety fixes.

According to PHP’s supported versions page, four branches obtain safety fixes from the PHP project as of October 2026:

Branch

PHP project safety assistance until

First publish alongside the PHP2Shell fix

8.5

December 31, 2029

8.5.12

8.4

December 31, 2028

8.4.27

8.3

December 31, 2027

8.3.36

8.2

December 31, 2026

8.2.35

8.1 and older

Ended

No new release, lone code fixes for 7.4 to 8.1 that you build yourself

PHP 8.2 stops receiving safety fixes on December 31, 2026, so moving to PHP 8.3 or newer gives you additional period before the next upgrade.

For WordPress sites, the WordPress requirements page recommends PHP 8.3 or greater.

Check four things before you toggle branches:

  • CMS core. Update WordPress or your another satisfied administration scheme (CMS) to its latest version.
  • Themes and plugins. Check all developer’s records or publish notes for assistance of your mark branch. The Requires PHP site on WordPress.org lone lists the minimum version.
  • Custom code. Check the PHP necessity in your project’s composer.json file, anywhere Composer lists it, and any code written for an older branch.
  • Backup. Back up the location and, anywhere possible, test the new branch on a staging copy (a personal copy of your site).

Once these checks pass, change your PHP version in your authority panel, or instal the newer branch’s packages on a VPS.

On Hostinger web hosting, PHP Configuration offers PHP 8.2 to 8.5, and the type you choose applies to all website on your hosting scheme apart from those built alongside Hostinger AI Builder.

The dashboard warns that switching stops all operating processes on your location and takes 1–2 minutes to complete.

Hostinger installs safety fixes, specified as the PHP2Shell patch, for your current type on all scheme apart from VPS, but updating to a newer branch is up to you. On a VPS, you instal all PHP updates yourself.

After switching, inspect the type again using Site Health, PHP Info, or a phpinfo() document to verify that your website is operating the new branch.

Hostinger web hosting banner

All of the tutorial satisfied on this website is topic to Hostinger's rigorous editorial standards and values.

Author

Bruno is a Content Writer at Hostinger, focused on creating and optimizing helpful, engaging articles concerning web betterment and marketing. With a backdrop in journalism, he combines storytelling alongside applicable insights to create complex topics easier to understand. He has additionally contributed to publications akin MacMagazine and Jornal A Tarde. Outside of work, Bruno enjoys exploring art, cooking, and technology.

Other Article Hostinger Tutorials
↑
Close Right Ads
Close Left Ads