Article
Upgrading PHP on WordPress safely
A safe WordPress PHP upgrade follows five steps: take a backup, update WordPress, plugins and the theme, test the new PHP version on a staging copy, switch the version in your hosting panel, then test the live site. If something breaks, switch back. WordPress.org currently recommends PHP 8.3 or greater.
Last reviewed 10 October 2026
A WordPress PHP upgrade is safe when it is done in this order: back up the site, update WordPress, plugins and the theme, test the new PHP version on a staging copy, switch the version in your hosting control panel, then test the live site. If something breaks, the version can be switched back. This article covers which version to choose and how to do each step.
What PHP is and why the version matters
PHP is the programming language WordPress, its plugins and its themes are written in. It runs on the web server. The version is a server setting, so it does not change when you update WordPress.
Each PHP version has a fixed life. According to php.net, a version gets two years of active support with bug and security fixes, then two more years of security fixes only. After four years it reaches end of life and receives nothing.
Running an end-of-life version means security holes found in PHP itself are never fixed on your server. Newer versions also run faster, which WordPress.org gives as one of the main reasons to update.
Which PHP versions are supported now
These are the supported versions listed on php.net, checked on 10 October 2026:
- PHP 8.5: active support until 31 December 2027, security fixes until 31 December 2029.
- PHP 8.4: active support until 31 December 2026, security fixes until 31 December 2028.
- PHP 8.3: security fixes only, until 31 December 2027.
- PHP 8.2: security fixes only, until 31 December 2026.
Versions older than 8.2 are no longer on the supported list.
These dates move every year. Check the supported versions page on php.net before you decide.
What WordPress recommends
The WordPress requirements page recommends PHP 8.3 or greater. WordPress still runs on PHP 7.4 and above, but the same page warns that the older versions have passed end of life and may expose a site to security vulnerabilities.
The WordPress core team's compatibility table lists PHP 7.4 through 8.5 as fully supported for the current WordPress 7.0 and 7.1 releases.
That support is for WordPress core only. Your plugins and theme are separate products, and they are where PHP upgrades usually go wrong.
Which version to choose
For most business sites in late 2026, PHP 8.3 or 8.4 is the practical target. Both have security support for more than a year, and plugin developers have had time to adapt to them.
- If you are on 8.2, plan the move now. Its security support ends on 31 December 2026.
- If you are on 8.1 or older, the site is on an unsupported version and the upgrade is overdue.
- The newest version is not always the best first choice. Older or rarely updated plugins can lag behind it. Test before committing.
How to check your current version
In the WordPress dashboard, go to Tools > Site Health > Info and open the Server section. The PHP version is listed there. Your hosting control panel shows it too.
The safe upgrade process
1. Take a full backup
Back up files and the database, and confirm you know how to restore. Changing PHP does not alter your files, but the next step does.
2. Update everything else first
Update WordPress, all plugins and the theme while still on the old PHP version, then check the site works. Recent releases are the ones written for recent PHP, so upgrading PHP underneath out-of-date plugins invites faults.
3. Look for known problems
- Check each important plugin's page for the PHP versions it supports.
- Look for plugins that have not been updated in years. They are the likeliest to fail.
- WordPress.org suggests the PHP Compatibility Checker plugin, and notes that it can miss issues or report problems that are not real. Treat it as a hint, not a verdict.
4. Test on staging
Create a staging copy of the site and switch that copy to the new PHP version. Then test:
- The home page and main templates
- Every form, with a real submission
- Booking, checkout or payment steps
- The WordPress admin area, including the editor
- Any connection to another system
Read the PHP error log as well. Some faults produce warnings in the log before they produce anything visible.
5. Switch the live site
Change the PHP version in your hosting control panel, or ask your host to do it. Choose a quiet time. Clear all caches afterwards.
6. Test again and watch the logs
Repeat the staging tests on the live site. Check the error log again over the following days, since some code only runs on a schedule or in rare cases.
If something breaks
- Switch the PHP version back in the hosting panel, or ask your host to. Being able to do this is what keeps the upgrade low risk.
- Use the error log to find which plugin or theme file caused the fault.
- Update, replace or remove that component, then try again on staging.
- If the site is still not right after switching back, restore the backup from step 1.
When to get help
Get help if the site runs on custom code, a theme that is no longer maintained, or a plugin the business depends on that has no current version. In those cases code may need to be rewritten before the upgrade is possible.
PHP reviews are part of routine WordPress maintenance, and a site stuck on an old version is a good reason to ask for an audit. Contact Stryx to talk it through. The wider routine is in the monthly WordPress maintenance checklist.
Frequently asked questions
Which PHP version should WordPress use?
WordPress.org recommends PHP 8.3 or greater. As of October 2026, php.net lists PHP 8.2, 8.3, 8.4 and 8.5 as supported, with 8.2 losing security support on 31 December 2026. For most business sites, 8.3 or 8.4 is a practical target once plugins and the theme have been tested on it.
Will upgrading PHP break my WordPress site?
It can, if a plugin or theme uses code the new version no longer accepts. WordPress core itself supports current PHP versions. The risk is managed by updating everything first, testing on a staging copy, and knowing how to switch the version back.
How do I upgrade PHP on WordPress?
PHP is changed on the server, not inside WordPress. Most hosts provide a PHP version setting in their control panel, and others will change it on request. Take a backup, update WordPress, plugins and the theme, and test on staging before changing the live site.
How do I check which PHP version my site uses?
In the WordPress dashboard, go to Tools, then Site Health, then the Info tab, and open the Server section. The PHP version is listed there. Your hosting control panel shows it as well.
Can I undo a PHP upgrade?
Yes. Switch the PHP version back in the hosting control panel or ask your host to do it. The setting does not change your site's files or database, which is why a rollback is straightforward.