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.

Guide2 min readLast updated
On this page
  1. WordPress
  2. Any site: a phpinfo file
  3. Just the version
  4. Mismatch between panel and phpinfo?
  5. If it doesn’t work

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

  1. In System Info & Files › File Manager, open the domain’s public_html.
  2. Create a file with an unguessable name, such as info-8f3k2.php.
  3. Put this in it:
<?php phpinfo();
  1. 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?

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.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going