PHP 8.2 end of life is on 31 December 2026. After that date, the PHP project ships no more security fixes for it. If your WordPress site still runs on 8.2, you have about six weeks to move, and October showed why that matters.
Short answer: PHP 8.2 stops receiving security fixes on 31 December 2026. Your WordPress site will keep working, but any new PHP flaw found after that date stays unpatched. Move to PHP 8.4 or 8.5, test on a staging copy first, and keep a rollback ready.
At a glance
- The date: PHP 8.2 security support ends on 31 December 2026.
- Who is affected: any WordPress or WooCommerce site whose web server runs PHP 8.2.
- What changes: nothing breaks on 1 January 2027. Security fixes simply stop.
- Move to: PHP 8.4 (fixes until end of 2028) or PHP 8.5 (fixes until end of 2029).
- Do this first: check the PHP version your web server actually reports, then build a staging copy.
- Avoid: PHP 8.3, which only buys one year, and PHP 8.6 on production until it has settled.
Last reviewed: 8 November 2026 by Ali Shan, founder of WPRobo. We update this post when PHP publishes new fixes.
When does PHP 8.2 reach end of life?
PHP 8.2 reaches end of life on 31 December 2026. The PHP project states it “will receive no further security fixes after that date”, on its PHP.net supported versions page.
“End of life” means the PHP project stops maintaining that version entirely. No bug fixes, no security fixes, no new releases.
PHP 8.2 was released on 8 December 2022. Its active support, the phase where general bug fixes ship, ended on 31 December 2024. Since then it has received security fixes only. Those stop at the end of this year.
If you are not sure which version you run, start with how to check your PHP version and confirm PHP2Shell is patched. Then come back here.
What does end of life mean for my site?
Your site keeps running after 31 December. It just stops getting fixed when the next serious PHP flaw appears. This October showed exactly what that looks like.
On 21 October 2026, PHP published fixes for two critical RCE flaws, now known as PHP2Shell. RCE means remote code execution: someone running their own code on your server. Both work without logging in. Both are rated CVSS v4.0 9.2, where CVSS is the standard 0 to 10 severity score. The details are in the PHP security advisory of 21 October 2026. Our full guide is PHP2Shell: what WordPress and WooCommerce owners need to do now.
Look at who got a patch that day:
- PHP 8.5 got 8.5.12.
- PHP 8.4 got 8.4.27.
- PHP 8.3 got 8.3.36.
- PHP 8.2 got 8.2.35.
- PHP 8.1 got nothing.
PHP 8.1 left security support on 31 December 2025. So there was no official 8.1 release when PHP2Shell landed.
The PHP project posted minimal source backports for 7.4, 8.0 and 8.1 on GitHub. Some Linux distributions and paid long-term support vendors carry their own fixes. But nobody shipped a PHP 8.1 release you could simply install.
Run the calendar forward a year. If a flaw like PHP2Shell turns up in February 2027, sites on 8.2 will be where 8.1 sites were this October.
The stakes were real. CISA, the US cyber security agency, added both flaws to its Known Exploited Vulnerabilities catalog on 26 October 2026. That list only includes flaws attackers are actually using.
The bug was in PHP itself, not in any application. WordPress runs on the same PHP, so a WordPress site on an unpatched server is exposed in the same way.
Which PHP version should I upgrade to?
For most WordPress sites, upgrade to PHP 8.4 or 8.5. Both give you at least two more years of security fixes. Here are the official dates from the PHP supported versions page:
- PHP 8.3: active support ended 31 December 2025. Security fixes only, until 31 December 2027.
- PHP 8.4: active support until 31 December 2026. Security fixes until 31 December 2028.
- PHP 8.5: active support until 31 December 2027. Security fixes until 31 December 2029.
- PHP 8.6: planned release on 19 November 2026.
Why not PHP 8.3?
Moving to 8.3 buys you one year. You would repeat this whole exercise in late 2027. The testing effort is much the same as for 8.4, so the shorter runway is wasted effort.
When to pick 8.4
PHP 8.4 is the sensible default for a site with a lot of older or third-party code. It has been out long enough for most actively maintained code to catch up. It is supported until 31 December 2028.
When to pick 8.5
PHP 8.5 suits sites with well-maintained themes and plugins and a proper test routine. It is supported until 31 December 2029. That is the longest runway available from a released version today.
Why not 8.6 yet?
A brand-new PHP release on a live business site is a test you did not need to run. Give 8.6 a few months. Let the first point releases land and let plugin and theme authors catch up.
Also check that your WordPress core version supports your target. The WordPress.org requirements page and the WordPress hosting handbook on server environment are the places to look.
How do I upgrade PHP safely on WordPress?
Test the new version on a staging copy, fix what breaks, then switch live with a rollback ready. The steps below are the order we work in. None of it is exotic. The value is in not skipping steps.
1. Take an inventory
Write down your WordPress version, your theme and any child theme, and every active plugin. Include custom code too: mu-plugins, snippets in functions.php and anything a past developer left behind.
WP-CLI, the command-line tool for WordPress, gives you most of this in three commands:
wp core version
wp theme list --fields=name,status,version,update
wp plugin list --fields=name,status,version,update
Update anything with an update waiting, on staging first. Old versions of maintained code are a common reason upgrades fail. Anything abandoned, with no release in years, goes on a watch list.
2. Build a staging copy
Clone the live site: files and database. Most managed hosts do this in one click.
Make sure staging cannot email real customers or charge real cards. Switch payment gateways to test mode and route outgoing mail somewhere safe.
3. Switch PHP on staging only
Change the PHP version for staging in your hosting control panel. On your own server, point staging at a separate PHP-FPM pool for the new version. PHP-FPM is the process manager that runs PHP behind nginx and many Apache setups.
Watch out for one trap. WP-CLI uses the command-line PHP binary, which can differ from the version serving web requests. Check what the web server actually runs in WordPress Site Health: Tools โ Site Health โ Info โ Server.
4. Turn on debug logging
Add this to wp-config.php on staging, above the line that says “That’s all, stop editing”:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', '0' );
Errors and notices now go to wp-content/debug.log instead of the screen. The WordPress Advanced Administration handbook covers these constants in more depth.
5. Test the money paths
A homepage that loads proves very little. Test the things that earn money or that people rely on:
- Checkout. Add to cart, apply a coupon, pay with a test card, confirm the order appears in admin.
- Forms. Submit every contact, quote and booking form. Confirm each entry lands where it should.
- Logins. Customer accounts, admin login, password reset.
- Scheduled tasks. List them with
wp cron event list, then run what is due withwp cron event run --due-now. - Emails. Order confirmations, form notifications, password resets. Check they send and render.
If you run a WooCommerce store and want a second pair of eyes on checkout, our WooCommerce payment audit covers exactly that path.
6. Switch production, with a way back
- Pick a quiet-hours window. For a UK store, early on a Tuesday morning beats Friday evening.
- Take a fresh backup of files and database right before the switch.
- Confirm your rollback. On most panels it is the same PHP dropdown, set back to 8.2. On your own server, keep the old PHP-FPM pool in place.
- Change the version and run through the money paths again on live.
- Make sure
WP_DEBUG_DISPLAYis off on production. Keep logging on only if the log is stored privately.
7. Watch the logs for a week
Some code only runs weekly, monthly or on rare events. Read the PHP error log and debug.log daily for the first week. Then turn WordPress debug logging off, or move the log outside the web root.
What breaks when you upgrade PHP?
Usually it is old custom code and abandoned plugins, not WordPress core. Most problems show up as fatal errors or deprecation notices in debug.log.
A fatal error stops a page or request dead. Fix those first. A deprecation notice is a warning that something will stop working in a future PHP version. It will not break the site today, but it tells you where the next upgrade will hurt.
Summarise the log
After testing, collapse the noise into a short ranked list:
sed 's/^\[[^]]*\] //' wp-content/debug.log \
| grep -E 'Deprecated|Fatal|Warning' \
| sort | uniq -c | sort -rn | head -40
Search custom code before you run it
Two patterns catch common problems when moving off 8.2. The first finds parameters with a default of null but no ? type marker, which PHP 8.4 deprecates. The second finds ${var} string interpolation, deprecated since 8.2.
# Implicitly nullable parameters (deprecated in PHP 8.4)
grep -rnE --include='*.php' \
'\(\s*[^?$)]*[A-Za-z_\\]+\s+\$[A-Za-z_]+\s*=\s*null' \
wp-content/themes/your-theme wp-content/mu-plugins
# ${var} interpolation inside strings (deprecated in PHP 8.2)
grep -rn --include='*.php' '"[^"]*\${' \
wp-content/themes/your-theme wp-content/mu-plugins
Grep is blunt. It will miss some cases and flag a few false ones. Treat the output as a reading list, not a verdict.
Fix or replace what breaks
- Maintained code with an update: update it.
- Custom code: fix it. Usually that is a small change per notice.
- Abandoned code with no update: replace it, or have someone take ownership of it.
Do not suppress errors to make the log quiet. Hiding a fatal error just moves it to production.
One known regression
PHP 8.4.27 and 8.5.12 have a SimpleXML crash regression (php-src issue #24488). It is unrelated to the security fixes. Does your site parse XML feeds, imports or exports? Then check the release notes for the latest patch on your target branch first.
What if my host upgrades PHP for me?
Many hosts move sites off end-of-life PHP eventually. On an untested site, that can break things at a time you did not choose.
The first sign is often a customer telling you checkout is down. A planned upgrade on your schedule costs less than an unplanned one on theirs.
Check your host’s announcements or control panel for its plans for 8.2. Then aim to finish your own upgrade before that date.
How we handle this on client sites
We treat a PHP upgrade as a tested change with a rollback, never a dropdown switch. This is what that looks like in practice:
- We check the PHP version the web server reports in Site Health, not the one the command line shows.
- We upgrade a staging copy first, with payments in test mode and outgoing mail caught.
- We read
debug.logafter testing checkout, forms, logins, cron and emails, not after a homepage load. - We fix fatal errors before launch and log deprecations as work for the next upgrade.
- We keep the previous PHP version ready as a rollback until the logs stay quiet for a week.
- After any PHP change, we restart every PHP worker and confirm the new version is the one answering requests.
- We record the next end-of-life date for each site, so the next move is planned, not rushed.
Following these steps reduces the risk of a broken launch. It does not remove it, which is why the rollback matters.
What else should I fix while I am on the server?
Use the upgrade window to tidy the rest of your PHP configuration. Start with CVE-2026-115560: turning off PHP session upload progress safely. That setting is a separate issue, and the October releases did not fix it.
Once the new version is stable, work through our WordPress security checklist.
And remember that a version upgrade is not a one-off. PHP 8.4 leaves security support at the end of 2028. Put that date in your calendar now.
If you would rather hand the whole job over, we plan and run PHP upgrades as part of our migrations and performance work. If you want someone watching updates and support dates after that, look at our WordPress care plans.
