How to check and change your WordPress site’s PHP version
Short answer
To check: in your WordPress admin, open Tools → Site Health, the Info tab, then Server: the line “PHP version” is the version your site runs. To change it: PHP runs on your host’s server, so you switch it in your hosting control panel (often under “PHP version”, “PHP Selector” or “MultiPHP Manager”) or ask your host. Before you switch, back up and check your plugins and theme for the new version; afterwards, you can switch back the same way.
Check your PHP version in two clicks
wordpress.org’s own instructions: “from the WordPress Dashboard, select Tools > Site Health from the sidebar menu, and then select the Info tab. Expand the Server section and scroll down until you see PHP version.” (wordpress.org)

The number is the version your website runs. Two places can show something else:
- WP-CLI (
wp --info) reports the server’s command-line PHP, which can differ. On our test site the same installation answered 8.2.29 on the command line and 8.5.11 in Site Health, as shown in checking many client sites. - Your hosting panel shows the setting it applies; after a change, Site Health confirms that WordPress sees it.
Which version should you choose?
wordpress.org recommends PHP 8.3 or higher (wordpress.org). The newer the version, the longer it gets security fixes (php.net):
| PHP version | Security fixes until |
|---|---|
| 8.2 | 31 December 2026 |
| 8.3 | 31 December 2027 |
| 8.4 | 31 December 2028 |
| 8.5 | 31 December 2029 |
Pick the newest one that your plugins, theme and host support. If your site is on PHP 8.2 or older, PHP 8.2 reaches end of life explains what the date means and how to choose.
Before you change it
- Back up files and database. Your host may offer backups in the hosting panel.
- Update WordPress, plugins and theme (Dashboard → Updates).
- Check your plugins and theme for the version you’re moving to. A PHP update can stop old code; CompatNav, for example, reads the code of every plugin and theme on your server and lists what will break and what only shows notices on the version you choose.
- Turn on an error log that visitors can’t see: the WordPress debug log shows how.
The full version of these steps, with a printable checklist, is in is my WordPress site ready for PHP 8?
Change it in your hosting panel
PHP is installed on your host’s server, so the setting is there, not in WordPress. wordpress.org: “PHP is installed on your website’s server, so updating it involves either interacting with your host’s settings or asking your provider to do it for you.” (wordpress.org)
- Log in to your hosting control panel (not the WordPress admin).
- Find the PHP setting. It is often called “PHP version”, “PHP Selector” or “MultiPHP Manager”, sometimes under “Software” or “Advanced”. On hosts with several sites, choose the right domain first.
- Choose the new version and save.
- Check Site Health again (Tools → Site Health → Info → Server): it should show the new version.
- Open your site, log in, and try the pages that matter (forms, checkout, search). Then watch the error log for a few days.
No such setting? Some hosts change PHP only on request. Ask them:
If something breaks after the change
Switch back to the previous version the same way, and the site works again at once; nothing is lost. Then find the plugin or theme that stopped: the critical error guide shows how to read the message that names it.
Key takeaways
- Check: Tools → Site Health → Info → Server → “PHP version”.
- Change: in your hosting control panel, or ask your host. WordPress itself can’t change PHP.
- wordpress.org recommends PHP 8.3 or higher. PHP 8.2 gets security fixes until 31 December 2026, 8.3 until 31 December 2027, 8.4 until 31 December 2028, 8.5 until 31 December 2029.
- Before switching: back up, update everything, check plugins and theme for the new version.
- You can switch back the same way if something breaks.
Frequently asked questions
Can I change the PHP version from inside WordPress?
No. PHP runs on your host’s server, before WordPress starts. The setting is in your hosting control panel, or your host changes it for you.
Which PHP version should I choose?
The newest version your plugins, theme and host support. wordpress.org recommends 8.3 or higher; 8.4 and 8.5 get security fixes for longer. Check your plugins and theme for the version first.
Why does WP-CLI show a different PHP version?
WP-CLI runs on the server’s command-line PHP, which can be a different version from the one serving your website. For the website, trust Site Health or your hosting panel.
Can I switch back if something breaks?
Usually yes, in the same place you switched, and the site works again at once. Ask your host how long the older version stays available.
What does “PHP Update Required” in my dashboard mean?
WordPress shows it when your site runs a PHP version older than 8.0. Our guide for when your host forces a PHP upgrade explains the notice and what to do.
Check your own site before you upgrade
CompatNav is a free WordPress plugin. It reads the code of your plugins and themes on your own server and tells you, in plain words, what will break and what will only show notices on the PHP version you choose. It never changes your code. It can’t see problems that only appear while code runs with real data, so a quick check of your site after the upgrade still matters.
Sources
About the code examples: each output is the real output of the code shown, run with the official PHP builds, without a php.ini, with all errors reported and displayed. Only the file path was replaced by a neutral server path.