WordPress PHP Version: How to Check It and Which One to Use

To check which PHP version your WordPress site runs, go to Tools > Site Health in the dashboard, open the Info tab, and expand the Server section. The PHP version is listed there along with your other server details. WordPress 7.1 needs at least PHP 7.4, WordPress.org recommends 8.3 or newer, and only PHP 8.2 through 8.5 still receive security fixes.

Below are three ways to check the version, a table of which PHP versions are still supported, and how to update safely. Version requirements are taken from WordPress 7.1 itself and support dates from php.net.

Key Takeaways
  • Find your PHP version under Tools > Site Health > Info > Server. No plugin or code needed.
  • WordPress 7.1 needs at least PHP 7.4, and WordPress.org recommends PHP 8.3 or newer.
  • Only PHP 8.2, 8.3, 8.4 and 8.5 still get security fixes, and 8.2 stops on December 31, 2026.
  • WP-CLI and php -v can report a different PHP version than your website actually runs. Trust Site Health for the site itself.
  • Your host controls the PHP version. Test the switch on a staging site and keep a backup before you change it.

Check your PHP version in the WordPress dashboard

Site Health is built into WordPress and shows the version your site is actually running, which makes it the most reliable check.

  1. Log in to your WordPress dashboard as an administrator and go to Tools > Site Health.
  2. Click the Info tab at the top of the page.
  3. Expand the Server section. The PHP version is listed alongside details like the PHP time limit and max input variables.
WordPress Site Health menu under Tools in the dashboard sidebar
PHP version displayed in the Server section of WordPress Site Health
The PHP version in the Server section of Site Health Info

You may not even need to look. When your PHP version is out of date, WordPress puts a PHP Update Recommended box on the main Dashboard screen. It changes to PHP Update Required when your version is below the minimum an upcoming WordPress release will need. The Status tab of Site Health flags an old version too.

Check your PHP version with a phpinfo() file

If you cannot get into the dashboard, or you need the full PHP configuration, a one-line file will show it. Create a file called phpinfo.php containing:

<?php phpinfo();

Upload it to your site’s root folder, the one that holds wp-config.php, with SFTP or your host’s file manager. Then visit yoursite.com/phpinfo.php. The version is at the top of the page, followed by every PHP setting and extension your server has.

Delete the file as soon as you have what you need. It exposes details about your server that you do not want public.

Check your PHP version from the command line

If you have SSH access, WP-CLI shows the PHP version in one command, and php -v prints just the version:

wp cli info
php -v

One catch: these commands report the PHP that your command line uses, and many hosts run a different version for the website itself. If the numbers disagree with Site Health, Site Health is the one your site actually runs on.

Which PHP version should WordPress use?

WordPress 7.1 will run on anything from PHP 7.4 upward, but you want a version that still gets security fixes. According to WordPress.org’s requirements page, hosts should support PHP 8.3 or greater. Here is where each version stands as of late September 2026:

PHP versionStatusSecurity fixes untilRuns WordPress 7.1
8.5Active supportDecember 31, 2029Yes
8.4Active supportDecember 31, 2028Yes
8.3Security fixes onlyDecember 31, 2027Yes (WordPress.org’s recommended minimum)
8.2Security fixes onlyDecember 31, 2026Yes
8.1 and 8.0End of lifeNo longer patchedYes, but insecure
7.4End of lifeNo longer patchedYes, the lowest version it accepts
7.3 and olderEnd of lifeNo longer patchedNo
PHP support dates from php.net and WordPress compatibility from the WordPress core handbook, checked September 30, 2026.

WordPress 7.0 raised the minimum from PHP 7.2 to 7.4, and the core compatibility table lists WordPress 7.0 and 7.1 as compatible with every PHP release from 7.4 to 8.5. If you are on PHP 8.1 or lower, ask your host to move you to 8.3 or newer.

How to update PHP safely

PHP runs on your server, so the switch happens in your hosting account, usually under a menu called PHP Version, PHP Manager or Software. If you cannot find it, your host’s support team can change it for you. Before you switch:

  • Take a full backup so you can roll back if something breaks.
  • Update WordPress, your theme and your plugins first. Old plugins are the most common reason a PHP upgrade goes wrong.
  • If you can, try the new version on a staging site before changing the live one.

After the switch, reload a few pages and check Site Health again. If the site shows “There has been a critical error on this website”, a plugin or theme is not compatible with the new version. Our guide to the critical error message walks through finding the culprit, and switching back to the old PHP version in your hosting panel restores the site while you do.

Frequently asked questions

What PHP version does WordPress 7.1 require?

WordPress 7.1 requires PHP 7.4 or newer, the minimum it will install and run on. WordPress.org recommends PHP 8.3 or greater, because PHP 7.4 through 8.1 no longer receive security fixes.

Is PHP 8.5 compatible with WordPress?

Yes. The WordPress core handbook lists PHP 8.5 as compatible with WordPress 6.9, 7.0 and 7.1. Individual plugins and themes may lag behind, so test on a staging site first.

How do I check my PHP version without logging in to WordPress?

Upload a one-line phpinfo.php file to your site’s root folder and open it in a browser, or check the PHP settings in your hosting control panel. Delete the phpinfo.php file afterwards.

Why does WP-CLI show a different PHP version than Site Health?

Many hosts run one PHP version for the command line and another for the website. WP-CLI and php -v report the command-line version. Site Health reports the version your website actually uses.

Will updating PHP break my WordPress site?

Usually not, if WordPress, your theme and your plugins are up to date. Plugins that have not been updated in years are the main risk. Back up first, and you can switch back to the old PHP version in your hosting panel if anything goes wrong.

Picture of Andy Feliciotti

Andy Feliciotti

Andy has been a full time WordPress developer for over 15 years. Through his years of experience has built 100s of sites and learned plenty of tricks along the way. Found this article helpful? Buy Me A Coffee

2 Responses

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Tips Monthly
Get the latest from SmartWP to your inbox.