How to check which PHP version your site is using
Find the PHP version, loaded extensions and settings your site actually runs with, using phpinfo() or WordPress Site Health.
On this page
The version selected in the panel and the version running your code should match, but checking directly removes all doubt.
WordPress
Tools → Site Health → Info → Server lists the PHP version, memory limit, maximum upload size and more.
Any site: a phpinfo file
- In System Info & Files › File Manager, open the domain’s
public_html. - Create a file with an unguessable name, such as
info-8f3k2.php. - Put this in it:
<?php phpinfo();- Visit
https://yourdomain.co.uk/info-8f3k2.php.
The top of the page shows the PHP version. Further down are the loaded extensions and every setting, with Local Value (what applies to this folder) and Master Value (the server default).
Important: Delete the file as soon as you’ve finished. phpinfo output reveals paths and configuration that help attackers.
Just the version
<?php echo PHP_VERSION;Mismatch between panel and phpinfo?
- The file might be in a different domain or subdomain folder with its own version setting.
- A cached page from a caching plugin or Cloudflare may be showing old output; add a query string such as
?x=1.
Prefer to follow along?
- Upgrade your site to a newer PHP version safely
Intermediate · 30 min
Not with Traxio yet? You can try this on a real server with our PHP hosting: £0.99 a month.
If it doesn’t work
These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.
- 500 Internal Server Error: how to fix itFind the real cause of a 500 error: read the error log, then check .htaccess, PHP errors, permissions and PHP version in order.
- Understanding PHP error messagesHow to read a PHP error: fatal errors, parse errors, warnings, notices and deprecations, what each means for your site, and where to look next.
- Blank white page: how to find the hidden errorA completely blank page usually means a PHP error that isn’t displayed. How to reveal it with logs and fix the cause.
Spotted something out of date or unclear? Tell us and we’ll fix it.