Skip to content
PHP Scanner
Guide · PHP versions

How to check your PHP version: 6 ways, from outside and inside

Updated By Catch Digital5 min read

Short answer

The quickest way to check your website's PHP version is an online checker like PHP Scanner, which reads the version when your server reports it. If it's hidden, look inside: WordPress shows it under Tools, Site Health, Info, Server; cPanel shows it in MultiPHP Manager or Select PHP Version; on a server, run php -v.

Your PHP version decides 2 things: whether your site has the PHP2Shell fixes PHP released on October 21, 2026 (the fixed releases are 8.2.35, 8.3.36, 8.4.27, 8.5.12), and whether your PHP still gets security updates at all. There are 6 ways to find it. Start with the first, and use the others when the version is hidden.

  1. Check from outside. Enter your address in PHP Scanner. It reads the headers your server sends and reports the PHP version when the server shares it.
  2. In WordPress: go to Tools, then Site Health, open the Info tab and expand Server.
  3. In WooCommerce: go to WooCommerce, then Status. The Server Environment section lists the PHP version.
  4. In cPanel: open MultiPHP Manager or Select PHP Version in the Software section.
  5. On the command line: run php -v over SSH. It shows the command-line PHP, which can differ from the website's.
  6. With a phpinfo() file: upload a 1-line file, open it in your browser, read the version, then delete the file.

Check your PHP version online, from outside

Many servers announce their PHP version in a response header, for example X-Powered-By: PHP/8.3.36. PHP adds it when its expose_php setting is on, and PHP's documentation lists that setting as on by default. A PHP version checker like PHP Scanner loads your page once, the way a browser does, and reads that header along with cookie names and code patterns that show whether PHP runs at all.

Many hosts turn the header off, which is good practice because it tells attackers less. Then an outside check can often confirm that the site runs PHP, but not the exact version, and you need 1 of the inside methods below. How PHP Scanner works lists everything it reads.

A version in a header is what the server says about itself. Linux distributions often patch PHP without changing the main version number, and proxies can strip or rewrite headers. Before you act on the number, confirm the exact release with your host.

Check the PHP version in WordPress

WordPress shows the exact version in its admin. Go to Tools > Site Health, open the Info tab and expand Server. The PHP version is listed there with your other server details. The Info tab can also copy all of this information to your clipboard, which is handy when a developer asks for it.

If the Status tab warns that your PHP is outdated, that's WordPress comparing your line with its own recommendation. It doesn't tell you whether the PHP2Shell fix is in, so compare the exact number with the table at the end of this page. How to update PHP in WordPress covers what to do next.

Check the PHP version in WooCommerce

WooCommerce stores have a second place to look. WooCommerce > Status opens the System Status report, and under Server Environment the PHP version row shows the version installed on your hosting server. WooCommerce support often asks for this report, so it's worth knowing where it lives.

Check the PHP version in cPanel

In cPanel, look in the Software section. MultiPHP Manager lists each domain with its current PHP version, and marks it Inherited when the domain uses the server's default. On servers that run CloudLinux, Select PHP Version shows the current PHP version and lets you change it in the same screen.

cPanel usually shows the PHP line your account is set to, such as 8.3, rather than the exact release inside it. The release comes from your host, so to confirm the PHP2Shell fix, ask them. How to change PHP version in cPanel walks through both screens, and our cPanel page has the details in 1 place.

Check the PHP version on the command line

If you or your developer have SSH access to the server, run:

php -v

The first line of the output shows the version, followed by (cli). That label matters: it's the command-line PHP. A server can have several PHP versions installed, and the PHP your terminal runs isn't always the PHP that PHP-FPM or Apache uses for the website. Treat php -v as a strong clue, then confirm the web version with Site Health, cPanel or a phpinfo() page.

For your developer: on a Linux server, the package manager shows which PHP packages are installed and from which build, which matters when the distribution backports fixes. Our pages for Ubuntu 24.04, Ubuntu 22.04, Debian 12 and Debian 11 list the commands.

Check the PHP version with a phpinfo() file

This works on any host where you can upload files, and it shows exactly what the web server runs. Create a file with a hard-to-guess name, such as info-7f3k.php, containing this 1 line:

<?php phpinfo();
  1. Upload the file to your site's public folder, usually public_html or the folder your domain points to.
  2. Open it in your browser, for example https://example.com/info-7f3k.php. The PHP version is in the heading at the top.
  3. Delete the file from the server as soon as you've read it.
Don't leave a phpinfo() file online. According to PHP's documentation, it prints the PHP version, server and operating system details, file paths, configuration values and the request's headers, which is a map for anyone probing your site.

What to do with the number

The PHP line is the first 2 numbers (8.3); the release is the full number (8.3.36). Find your line below and compare the release.

From PHP's security announcement of October 21, 2026. Checked October 22, 2026.
PHP lineFirst release with the PHP2Shell fixReleases from before the fix
8.58.5.128.5.0 to 8.5.11
8.48.4.278.4.0 to 8.4.26
8.38.3.368.3.0 to 8.3.35
8.28.2.358.2.0 to 8.2.34
8.1, 8.0, 7.4No release: PHP published a source-code fix onlyEvery release on these lines

If your release is older than the fixed release for its line, ask your host or developer to update it. If you run 8.1, 8.0 or 7.4, the line no longer gets regular releases, so plan a move to a supported version: PHP versions and end-of-life dates has every date. Is my website affected by PHP2Shell? puts all of this together.

Questions people ask

What PHP version is my website using?

Run an online check first: PHP Scanner reports the version when your server shares it. If it's hidden, WordPress shows it under Tools > Site Health > Info > Server, and cPanel shows it in MultiPHP Manager or Select PHP Version.

Why does php -v show a different version than my website?

The command line and the web server can use different PHP installations on the same server. php -v shows the command-line PHP; for the website's version, use Site Health, cPanel or a phpinfo() page.

Why can't an online checker see my PHP version?

Many servers turn off the header that reports it, which is good practice. A checker can often still tell whether the site runs PHP; get the exact version from inside, or ask your host.

Should I delete the phpinfo() file afterward?

Yes, right away. It shows your PHP version, server paths and configuration to anyone who finds the address.

Sources

Checked against these sources on October 22, 2026. PHP Scanner is a free tool from Catch Digital and is not affiliated with the PHP project.

Keep reading4 related