PHP 8.2 end of life is 31 December 2026. According to php.net, each PHP branch gets two years of active support and then two years of critical security fixes only. PHP 8.2 was released on 8 December 2022, its active support ended on 31 December 2024, and its security support ends at the close of this year.

After that date, php.net's guidance for end-of-life branches is simple: upgrade as soon as possible, because you may be exposed to unpatched security vulnerabilities. Here is how to do that for a WordPress site without drama.

What Does PHP 8.2 End of Life Actually Mean?

End of life does not switch anything off. Your site will still load on 1 January 2027. What changes is that the PHP project will no longer release fixes for that branch.

That matters more than it might sound. Earlier this month, the PHP team released emergency fixes for the PHP2Shell vulnerabilities, and PHP 8.2 received a patched release (8.2.35) because it was still in security support. A similar issue discovered next year would have no upstream fix for 8.2. My write-up on PHP2Shell explains why the runtime under WordPress needs the same care as plugins.

Table of PHP support dates: PHP 8.2 security until 31 December 2026, 8.3 until 2027, 8.4 until 2028, 8.5 until 2029, 8.1 and older end of life
PHP support dates from php.net, checked on 29 October 2026.
PHP branchActive support untilSecurity fixes until
PHP 8.231 Dec 202431 Dec 2026
PHP 8.331 Dec 202531 Dec 2027
PHP 8.431 Dec 202631 Dec 2028
PHP 8.531 Dec 202731 Dec 2029

PHP 8.1 and older are already end of life. If your site is on one of those, the upgrade is more urgent, and the steps below still apply.

How Do I Check Which PHP Version My WordPress Site Uses?

  1. Log in to WordPress and go to Tools → Site Health.
  2. Open the Info tab and expand Server.
  3. Read the PHP version line.

Your hosting control panel usually shows it as well, often with a selector to change it. If you use the command line, remember that php -v reports the CLI version, which can differ from the version your web server uses for the site. Site Health shows the one that matters for visitors.

Which PHP Version Should You Upgrade To?

For a new WordPress 7.1 installation, the WordPress Hosting Team's compatibility page recommends PHP 8.4.x or 8.5.x. The same page lists WordPress 7.1 as fully compatible with PHP 8.2, 8.3, 8.4 and 8.5, and notes that WordPress still runs on 7.4 to 8.1 for backward compatibility only.

Jumping two versions at once is fine if you test properly. The steps are the same either way.

Interlocking teal gears with one red misaligned gear, representing a plugin that is not compatible with a new PHP version
WordPress core is rarely the problem. A single outdated plugin or custom function usually is.

How Do You Upgrade PHP for WordPress Safely?

The safest path is the boring one: test a copy first, then switch production when you are confident.

Six-step PHP upgrade workflow: check, back up, stage, test, switch, watch
Six steps that work for a single site or a portfolio of them.
  1. Check: note the current PHP version and the WordPress version.
  2. Back up: take a full backup of files and database and store it off the server. My guide to restoring WordPress from a backup is worth a read before you need it.
  3. Stage: clone the site to staging and switch only staging to the new PHP version.
  4. Test: work through the checklist in the next section.
  5. Switch: change production's PHP version at a quiet time.
  6. Watch: keep an eye on error logs and key journeys for a few days.
Two server towers connected by a light bridge, with a red test beacon on the staging copy
Staging takes the risk so production does not have to.

What Should You Test Before Switching?

Most PHP upgrade problems come from plugins, themes and custom code that rely on behaviour newer PHP versions have deprecated or removed. php.net publishes a migration guide for each version if you or your developer want the detail.

Checklist before switching PHP versions: update everything, check plugin PHP requirements, read the debug log, test custom code, integrations and rollback
Run this on staging, with debug logging switched on.

On staging, debug logging can be switched on in wp-config.php:

define( 'WP_DEBUG', true );
      define( 'WP_DEBUG_LOG', true );
      define( 'WP_DEBUG_DISPLAY', false );

Keep debug display off on live sites. Showing PHP errors to visitors can leak file paths and other details. Use logging on staging, and remove these lines, or set WP_DEBUG back to false, before the site goes live.

If a plugin does fail, you have three options: update it, replace it with a maintained alternative, or have the incompatible code fixed. Sometimes the right answer is a small custom plugin instead of a large abandoned one.

What If My Host Does Not Offer a Newer PHP Version?

Ask your host directly what their plan is for PHP 8.2 sites after 31 December, and whether they offer 8.3, 8.4 or 8.5. For end-of-life branches, php.net notes that some Linux distributions and long-term support vendors provide backported fixes. That is a vendor service, not something to assume, so get your host's answer in writing.

If the answer is unclear, it may be time to move. A host that keeps PHP current is part of the same foundation as practical WordPress security. While you are updating the stack, make sure WordPress itself is current too; the WordPress 7.1.4 security update landed on 28 October.

Frequently Asked Questions

Will my site stop working on 1 January 2027?

No. PHP 8.2 will keep running. What stops is upstream security fixes, so any vulnerability found after that date will not be patched by the PHP project. That is the risk to plan around.

Which PHP version should I move to?

For a new WordPress 7.1 install, the WordPress Hosting Team recommends PHP 8.4 or 8.5. For an existing site, 8.4 is a sensible target if your plugins support it, as php.net lists security support until 31 December 2028. PHP 8.3 works too, but its security support ends on 31 December 2027.

Does WordPress support PHP 8.4 and 8.5?

Yes. The Hosting Team's WordPress 7.1 compatibility page lists 7.1 as fully compatible with PHP 8.2, 8.3, 8.4 and 8.5. Your plugins and theme are the parts to test.

Can I switch PHP back if something breaks?

Usually, yes. Most hosting control panels let you select the PHP version per site, so keep the previous version available as a rollback option until you are confident in the upgrade.

Final Thoughts

The PHP 8.2 end of life date is fixed and public, which makes it one of the easier security risks to manage. Check your version this week, pick a target (8.4 is a sensible default), test on staging and switch before the holidays rather than after.

If you would like help testing plugins and custom code against a newer PHP version, my website maintenance service covers PHP upgrades from staging to production.

Official References

For the primary sources behind this article, and the latest updates, see: