This works for me:

curl -I http://websitename.com

Which shows results like this or similar including the PHP version:

HTTP/1.1 200 OK
Date: Thu, 13 Feb 2014 03:40:38 GMT
Server: Apache
X-Powered-By: PHP/5.4.19
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Cache-Control: no-cache
Pragma: no-cache
Set-Cookie: 7b79f6f1623da03a40d003a755f75b3f=87280696a01afebb062b319cacd3a6a9; path=/
Content-Type: text/html; charset=utf-8

Note that if you receive this message:

HTTP/1.1 301 Moved Permanently

You may need to curl the www version of the website instead i.e.:

curl -I http://www.websitename.com
Answer from Neil Robertson on Stack Overflow
🌐
Updatephp
updatephp.com › free-online-php-version-checker
free-online-php-version-checker - UpdatePHP
PHP expiry alert : PHP v8.1 has recently expired. Is your website still running this version? Click here for more details · SAFE versions of PHP: 8.5.2, 8.4.17, 8.3.30, 8.2.30
People also ask

How do I check the PHP version of a website?
You can check the PHP version of a website using our PHP version checker tool. Simply enter the website URL and click 'Check PHP Version'.
🌐
webride.net
webride.net › tools › phpchecker
PHP Version Checker
What is PHP?
PHP is a popular general-purpose scripting language that is especially suited to web development. It is fast, flexible, and pragmatic.
🌐
webride.net
webride.net › tools › phpchecker
PHP Version Checker
Why do I need to know the PHP version of a website?
Knowing the PHP version of a website helps you understand the compatibility of the site with various PHP features and security updates.
🌐
webride.net
webride.net › tools › phpchecker
PHP Version Checker
🌐
WP Engine
wpengine.com › home › resources › how to check which version of php you’re using
How to Check Which Version of PHP You're Using
September 28, 2024 - While the Site Health Status page ... version of PHP you’re using by navigating to the Tools > Site Health > Info page in the WordPress dashboard and opening the Server tab....
🌐
Web321
web321.co › home › online tools & downloadable resources › get a website’s php version
What's My IP Address?Check Your WordPress PHP Version
October 2, 2025 - To easily check your current PHP version, we've created a simple PHP Version Checker tool for WordPress sites: Just enter your website URL to instantly get your current PHP version and WordPress recommendations.
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to check php version
How to Check PHP Version | phoenixNAP KB
December 9, 2025 - This article showed the common ways to check the PHP version on your server, local machine, or WordPress website. The methods covered in this tutorial include running PHP code, using the command-line interface, or checking the version via plugins or WP dashboard. Next, check out how to make a redirect in PHP or see the 4 different types of errors in PHP.
🌐
Webride
webride.net › tools › phpchecker
PHP Version Checker
Check the PHP version of any website using our PHP version checker tool. Simply enter the URL and get the PHP version in seconds.
Find elsewhere
🌐
Top Left Design
topleftdesign.com › home › is your website running on an out of date php version?
Is your website running on an out of date PHP version? - Top Left Design
June 4, 2025 - There is an easy way to check if your hosting company is running a slightly older version. Ask your website programmers to install a WordPress plugin called Version Info plugin. Visit: https://wordpress.org/plugins/version-info/ Upon activation, ...
🌐
Catalyst2
catalyst2.com › home › cpanel – how to check the php version for a website
cPanel - How to check the PHP version for a website - catalyst2
January 4, 2024 - cPanel's MultiPHP Manager lists all domains on your account, together with their PHP version. It also shows the system's default PHP version.
🌐
ForumWeb Hosting
forumweb.hosting › home › forums › web hosting discussion › hosting software and control panels
How can I find the version of PHP that is running on a website?
March 19, 2017 - Another way is to use a online SaaS tool like this https://securityheaders.io/ which shows up X-Powered by header information, if your target website exposing php version publicly.
🌐
WP Buffs
wpbuffs.com › wordpress-php-version-check
How to Check Your WordPress PHP Version (3 Methods)
It’s highly recommended that ... we explained three ways you can check your WordPress PHP version: Use the WordPress Site Health tool from your dashboard....
Published   September 16, 2024
🌐
IsItWP
isitwp.com › home › snippets › conditional › check php version
Check PHP Version
November 1, 2018 - Want to check PHP version of your website? Add the following code to the functions.php file of your WordPress theme to check PHP version.
🌐
Reddit
reddit.com › r/phphelp › how to check php version?
r/PHPhelp on Reddit: How to check PHP version?
November 4, 2023 -

hi, I'm new to PHP.

I want to change display_errors to On for debugging, but see many PHP versions installed.

I thought going to http://localhost/first/index.php?language=English&page=phpinfo would give me the version , but it just renders the regular index page.

Ty.

🌐
SiteGround
siteground.com › kb › how_to_check_which_php_version_is_running_on_my_account
How to check which PHP version is running on my account? - SiteGround KB
April 12, 2024 - To resolve this problem, check ... will remove the custom set PHP version for that folder and set it to the PHP version you have set in Site Tools -> Devs -> PHP Manager....
🌐
Linuxize
linuxize.com › home › php › how to check the php version
How to Check the PHP Version | Linuxize
January 20, 2020 - The most reliable way of finding out what version of PHP is used for that specific website is to use the phpinfo() function, which prints various information about the PHP server, including its version.
🌐
InMotion Hosting
inmotionhosting.com › inmotion hosting home › support › website › find php version and options of your server
Find PHP Version and Options of Your Server | InMotion Hosting
June 7, 2023 - Now if you visit your website such as https://example.com/info.php you should see the PHP info page. This example screenshot shows that this server is running PHP version 5.2.17, and that the PHP configurations are getting loaded from the file: /home/userna5/public_html/php.ini · You can scroll further down the PHP info page, to also see individual PHP options that you can set. Now that you know how to check what version of PHP is running on your server, you might also be interested in changing it.
🌐
xneelo
xneelo.co.za › help-centre › website › how-to-check-your-php-version
How to check your PHP version - xneelo Help Centre
March 19, 2025 - Under Hosting Tools, select PHP Config. ... Your PHP version will be visible under PHP Config. The PHP Compatibility Scanner will help you check if your website is compatible with a newer PHP version.
🌐
Codecourse
codecourse.com › articles › how-to-check-your-php-version-3-ways
How to Check Your PHP Version (3 Ways)
Because your CLI and web server ... more accurate. To find out the version of PHP using phpinfo, create a PHP file somewhere that your web server can run it:...