All guides

Site health

PHP 8.2 end of life: what WordPress site owners should do, and how to upgrade safely

PHP 8.2 stops getting security fixes on 31 December 2026. Check which PHP your WordPress site runs, find what could break, test on a copy and switch before your host does it for you.

9 min readUpdated

What changes on 31 December 2026

PHP is the language WordPress, your theme and every plugin are written in. Each PHP version gets two years of bug fixes and then two years of security fixes only. For PHP 8.2 that second period ends on 31 December 2026 (php.net supported versions). From 1 January 2027, a security hole found in PHP 8.2 stays open.

It is not a niche problem. WordPress.org's own statistics (PHP versions in use) show about 22% of WordPress sites on PHP 8.2 and about 53% on 8.2 or older. PHP 8.1 already reached end of life on 31 December 2025 (php.net), so roughly 31% of sites are on an unsupported version today, and after New Year it will be more than half.

Do not wait for WordPress to tell you. WordPress itself runs on PHP 7.4 and later, and its compatibility table lists PHP 8.2 to 8.5 as supported by WordPress 7.1 (PHP compatibility and WordPress versions). The PHP check WordPress runs against WordPress.org still rates 8.1 and 8.2 as acceptable, so the dashboard shows no "PHP Update Required" box, and Site Health lists the upgrade as a recommendation rather than a critical issue. WordPress.org's recommended version is PHP 8.3 or newer (requirements).

Why it matters even if nothing breaks today

Two things move whether you act or not.

Plugins raise their minimum. When a plugin declares a newer "Requires PHP" than your server has, WordPress will not install its updates. Contact Form 7, with 10+ million active installs, has required PHP 8.3 (and WordPress 7.1) since version 6.2. On PHP 8.2 or older, WordPress will not move the site past the 6.1 series. WooCommerce announced that version 11.6, planned for February 2027, requires PHP 8.1 and recommends 8.3 or newer; stores on older PHP can update only as far as 11.5, which gets only the most severe security fixes backported (WooCommerce developer blog).

Your host has its own timetable. Hosts handle end of life differently, and some act before the official date. Three examples, as they stand at the time of writing:

  • WP Engine upgrades every site to a newer version when its PHP version reaches end of life, says the upgrade cannot be deferred, and emails each site's technical contact beforehand (WP Engine PHP guide).
  • Kinsta has a per-site setting for automatic PHP upgrades at end of life, and offers older versions with its own long-term security patches, free, for sites that need more time (Kinsta changelog).
  • Pressable retires PHP 8.2 on 8 December 2026, a few weeks before the official end, and upgrades the sites still on it to the next version automatically (Pressable PHP FAQ).

Check your own host's PHP page or support docs, and read the emails about it. If your host upgrades automatically, the question is not whether you move but whether you test first.

Check which PHP version your site runs

In WordPress, open Tools, then Site Health, then the Info tab, and expand Server. The PHP version row is the version your site actually runs on. The Status tab says the same in words: on 8.2 it reports an older version of PHP that should be updated.

Two traps:

  • WP-CLI can report a different version. wp --info shows the PHP that runs WP-CLI on the command line, which on many hosts is not the PHP that serves the website. Trust Site Health.
  • Each site can have its own setting. On shared hosting the version is often set per domain or per folder (cPanel calls the screen MultiPHP Manager). Check every site on the account, not just one.

What actually breaks when PHP changes

Current WordPress (6.9 and later) supports PHP 8.3, 8.4 and 8.5, so keep core up to date and it is not the problem. The risk is your plugins, your theme and any custom code: snippets in functions.php, a must-use plugin a developer added years ago, a code-snippets plugin. Problems come in three kinds.

Fatal errors. Code that calls something the new PHP no longer has stops the page with "There has been a critical error on this website". The jump from PHP 7.4 to 8.x is where most of these live: PHP 8.0 removed functions such as create_function(), each() and money_format() (PHP 8.0 changes). Moving from 8.2 to 8.4 brings fewer. One to know about: PHP 8.4 moved the IMAP, OCI8, PDO_OCI and PSpell extensions out of PHP itself (PHP 8.4 removed extensions). A plugin that fetches email into the site through PHP's IMAP functions, such as imap_open(), fails unless your host installs that extension separately.

Deprecation notices. These are warnings about code that a future PHP will refuse. PHP 8.4 deprecates a common pattern in older code, a parameter with a type and a default of null that does not say it accepts null (PHP 8.4 deprecations). PHP 8.5 deprecates, among others, null as an array key, the backtick shell operator, curl_close() and imagedestroy() (PHP 8.5 deprecations). A notice on its own does not stop anything. It becomes a problem when the server prints notices into the page: they then corrupt AJAX and REST responses and break redirects with "headers already sent". Keep notices in a log, never on screen.

Changed behaviour. The quietest kind. In PHP 8.0, for example, comparing 0 == "not-a-number" changed from true to false. Code like that keeps running and gives a different answer.

The plugins most likely to cause trouble are the ones nobody maintains. On each plugin's WordPress.org page, look at Last updated and Tested up to. A plugin that has not been touched in two or three years is the first thing to test, and the first thing to replace.

Pick the version to move to

VersionSecurity fixes untilNotes
PHP 8.331 December 2027WordPress.org's recommended version; WooCommerce recommends 8.3 or newer
PHP 8.431 December 2028A year longer; more deprecation notices from older plugins
PHP 8.531 December 2029Released November 2025; the most notices from older code

Dates from php.net. If your test on a copy comes back clean on 8.4, take 8.4: it buys an extra year before you do this again. If 8.4 shows errors you cannot fix yet, 8.3 is a sound stop. Avoid a release that came out in the last few months (PHP 8.6 was released in November 2026): most plugins have not been tested on it yet.

Test on a copy before your host switches you

Never try a new PHP version on the live site first. Test on a copy.

Get a copy. Many hosts have one-click staging; use it if yours does. WP Engine also has a PHP Test Driver that shows the site on a newer PHP in your browser only. If your host has neither, make a copy on a subdomain such as staging.example.com with Dragon Migrate: on the live site, build a full-site archive (the database plus uploads, themes and plugins in one zip); install WordPress on the subdomain with the same table prefix and Dragon Migrate active; unzip the archive and upload its uploads, themes and plugins folders into the copy's wp-content over SFTP; then import the database part from Migrate's Import tab with Find set to the live address and Replace set to the staging one. The guide to moving WordPress to a new host walks through the same steps in detail. Before you click around a copy, set Settings, then Reading to discourage search engines, and put payment gateways in test mode so a test order charges nobody.

Then, on the copy:

  1. Update everything first, on the current PHP. Plugin and theme authors fix PHP problems in updates, so test the versions you will actually run.

  2. Turn on the debug log in wp-config.php, with the display off so visitors never see a notice:

    php
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  3. Switch the copy's PHP version in your hosting control panel.

  4. Use the site the way your visitors and editors do. Work through the checklist below.

  5. Read wp-content/debug.log. Lines with "PHP Fatal error" must be fixed before you switch the live site. "PHP Deprecated" lines are not blockers, but note which plugin they name and tell its author. "PHP Warning" lines are worth a look.

The checklist for step 4:

  • Home page, a post, a page and a search results page
  • Log in, open the dashboard, edit and save a post, upload an image
  • Every form: contact, sign-up, booking, comments
  • Shop, product page, cart, checkout with a test payment, My Account
  • Pages built with a page builder, and any custom page templates
  • Scheduled jobs: let WP-Cron run, or see the guide to WordPress cron not running to check it
  • Emails the site sends: order confirmations, password resets, form notifications

For each fatal error, the log names a file. If the path is under wp-content/plugins/<folder>, update that plugin, search its support forum, or replace it. If it is your theme or custom code, that is a job for whoever maintains it. Fix, then test the copy again until the log stays clean of fatal errors.

Switch the live site safely

  1. Pick a quiet hour and tell anyone who edits the site.
  2. Take a backup, or check that your host's daily backup ran. Switching PHP does not change your files or database, but you will probably update plugins at the same time, and updates can.
  3. Update plugins and themes on the live site to the versions you tested.
  4. Switch the PHP version in the control panel. Some hosts take a few minutes to apply it.
  5. Run the checklist again, quickly, and watch the error log for a few days. Scheduled jobs and less-visited pages turn up problems later.

If something breaks, switch back to 8.2 while your host still offers it, and fix the problem on the copy. That window closes: some hosts remove 8.2 before the end of December, and some move you on automatically after it.

If your host has already upgraded you

If the site broke after a host upgrade, start with the email WordPress sends the site admin when a plugin or theme causes a fatal error. Its recovery-mode link signs you in with the broken plugin paused, so you can deactivate it from the Plugins screen. No email? Rename the plugin's folder in wp-content/plugins over SFTP and WordPress deactivates it.

Then ask your host whether it can put the site back on the old version for a few days while you test on a copy. Some can, and some offer patched old versions for exactly this. Either way, work through the copy-and-test steps above before you leave the site on the new version for good.

Site health

How to find and fix broken links in WordPress

Find broken internal, external and image links across a WordPress site, triage them without false alarms, fix them safely in the block editor, and stop new ones appearing.

7 min readRead