PHP 8.2 End of Life: How to Upgrade WordPress Site Safely

Affiliate disclosure: we may earn a commission from links on this page, at no extra cost to you. How we review.

PHP 8.2 reaches end of life on 31 December 2026. After that date, the PHP project will no longer release security fixes for it. If your WordPress site still runs PHP 8.2, or anything older, now is the time to plan the upgrade.

Your site will not suddenly go offline on 1 January. The risk is quieter: any new vulnerability found in PHP 8.2 will not be fixed by the PHP project. This guide shows you how to check your version, choose the right new one, test safely, switch, and recover if something breaks.

Quick Answer

  • Deadline: PHP 8.2 security support ends on 31 December 2026.
  • Recommended target: PHP 8.4 for most WordPress sites.
  • Fallback: PHP 8.3 if an important plugin or theme fails on 8.4.
  • Safe method: back up, update, test on staging, switch, then monitor.

What Does PHP 8.2 End of Life Mean?

WordPress is written in PHP, and your web server runs PHP to build your pages. Each PHP branch has a fixed support period: first active support (bug and security fixes), then a period of security fixes only. When that ends, the branch is at end of life (EOL).

PHP 8.2 has been receiving security fixes only since the start of 2025. You can confirm every date on the official PHP Supported Versions page.

Php support timeline
PHP versionActive support untilSecurity fixes until
8.231 Dec 202431 Dec 2026
8.331 Dec 202531 Dec 2027
8.431 Dec 202631 Dec 2028
8.531 Dec 202731 Dec 2029

Why You Should Not Wait

  • Security: PHP released fixes for critical remote code execution vulnerabilities in October 2026, including a patched 8.2 release. After EOL, the PHP project will not provide such fixes for 8.2. See the PHP.net news archive.
  • Compatibility: plugins, themes and libraries gradually raise their minimum PHP version.
  • Hosting: some hosts remove old versions or move sites automatically. A planned upgrade is safer than a surprise one.
  • Client and store risk: on a business site or online store, an unplanned failure can stop leads and orders.

One exception to understand: some Linux distributions and hosting companies backport security patches to older PHP packages, and paid extended support also exists. Ask your host exactly what it covers and for how long. Treat it as extra time to migrate, not a permanent solution.

Which PHP Version Should You Upgrade To?

WordPress.org requirements recommend PHP 8.3 or greater. The WordPress Hosting Handbook goes further and recommends PHP 8.4 or later for production. It lists PHP 8.4 as fully supported by WordPress 6.7 and later, and PHP 8.5 by WordPress 6.9 and later.

Which PHP version should you choose
  • PHP 8.4: our suggested default. It has support until the end of 2028 and has had more time in the ecosystem than 8.5. Its active support ends on 31 December 2026, after which it gets security fixes only.
  • PHP 8.5: a good choice if your WordPress version, theme, plugins and custom code all work with it. It has the longest support window of these three.
  • PHP 8.3: a temporary fallback. Moving there means planning another upgrade before the end of 2027.
  • PHP 8.6: very new. Do not use it on a production site until WordPress and your plugins confirm support.

WordPress core support does not guarantee that every plugin or theme works. Your own testing is what matters. If you run a store, also check the WooCommerce server recommendations. At the time of writing, they recommend PHP 8.3 or greater and say WooCommerce is tested up to PHP 8.4. Separately, WooCommerce has announced that version 11.6 will require PHP 8.1 or newer.

How to Check Your Current PHP Version

Method 1: WordPress Site Health

  1. Log in to your WordPress dashboard.
  2. Go to Tools → Site Health.
  3. Open the Info tab.
  4. Expand Server and find PHP version.

WooCommerce users can also go to WooCommerce → Status and look under Server environment.

Method 2: Hosting Control Panel

Look for PHP Configuration, MultiPHP Manager, Select PHP Version or a similar option. Names differ between hosts. If you have several sites, check each domain, because each one may use a different version.

Method 3: Command Line

php -v
wp --info
wp eval 'echo PHP_VERSION;'

Be careful: the command line can use a different PHP version from your website. Treat Site Health as the check for what the live site is using.

The Safe PHP Upgrade Process

WordPress php upgrade workflow

Step 1: Audit Your Site

Write down your WordPress version, PHP version, theme, child theme and all active plugins. Then look for these common risk areas:

  • Plugins or themes with no update for a long time
  • Premium plugins with expired licences, which may have stopped receiving updates
  • Custom plugins, code snippets and edits in functions.php
  • Must-use plugins in wp-content/mu-plugins
  • Payment, shipping, subscription, booking and membership integrations
  • Server cron scripts that run PHP outside WordPress

With WP-CLI, you can export your plugin and theme lists:

wp core version
wp plugin list --fields=name,status,version,update --format=csv > plugins.csv
wp theme list --fields=name,status,version,update --format=csv > themes.csv

Step 2: Create a Full Backup

Back up both the database and the files. Keep a copy away from the web server, and make sure you know how to restore it. A backup you have never tested is only a hope.

Switching the PHP version back is usually quick. But an update or a plugin may also change your database, and changing PHP back will not undo that. This is where the backup matters.

Step 3: Update WordPress, Plugins and Themes

Update everything before changing PHP, while still on your current version. This way, if something breaks, you know whether the update or PHP caused it. Test major updates on staging first, especially on stores. Replace abandoned plugins. Deactivating a plugin stops it from loading normally, but delete the ones you no longer need.

Step 4: Build a Staging Site

A staging site is a private copy of your live site. Many hosts include a one-click staging tool. You can also use a plugin such as WP Staging. If you are comparing hosts, see our guide to the best WordPress hosting and check staging and PHP version options on the plan you are considering.

  • Block search engines and protect the staging site with a password.
  • Put payment gateways in test mode.
  • Disable or capture outgoing emails so real customers receive nothing.
  • Pause live webhooks, subscription renewals and marketing automations.
  • Confirm that staging can run a different PHP version from the live site.

Step 5: Check Code Compatibility

For custom code, PHPCompatibilityWP can scan files for PHP compatibility problems. It runs with PHP_CodeSniffer. The version 3 line, which has the newer checks, was still a pre-release when this guide was written, so check the project page for current installation instructions. Run it in a development copy, not on your production server:

composer config minimum-stability alpha
composer config prefer-stable true
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev phpcompatibility/phpcompatibility-wp:"^3.0@dev"

vendor/bin/phpcs -p --standard=PHPCompatibilityWP \
  --runtime-set testVersion 8.4- \
  --extensions=php /path/to/wp-content/themes/your-child-theme

Point it at your custom theme and custom plugins first. A scanner can miss problems and can report false positives. A clean result does not replace real testing.

Step 6: Switch Staging to PHP 8.4 and Turn On Logging

Change the PHP version on staging only. Then add the following to wp-config.php, above the line that says to stop editing. If these constants already exist, edit them instead of adding duplicates.

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

Errors are normally saved to wp-content/debug.log. This file may be publicly accessible and can expose sensitive details, so protect it, turn logging off after testing and delete the log. The official WordPress debugging guide explains the options. Query Monitor can also help you find which plugin or theme triggers an error.

Step 7: Test Important Functions

Loading the homepage is not enough. Test what your visitors and your business actually use:

AreaWhat to test
Front endHomepage, templates, menus, search, popups, mobile view
AdminLogin, post editor, page builder, media upload, plugin settings
Forms and emailSubmission, notifications, file uploads, SMTP delivery in test mode
WooCommerceCart, checkout, test payments, coupons, tax, shipping, refunds, order emails
UsersRegistration, password reset, member areas, subscriptions
Background tasksWP-Cron, server cron, scheduled posts, backups, imports
IntegrationsREST API, webhooks, CRM and third-party APIs

What Can Break When You Move from PHP 8.2?

The jump from 8.2 is smaller than a jump from 7.x, but older code can still cause problems. The official migration guides list the changes: PHP 8.3, PHP 8.4 and, if you target it, PHP 8.5. If you skip versions, read each guide in between.

Implicitly Nullable Parameters (PHP 8.4)

This is a common source of new deprecation notices. A typed parameter with a null default must now declare that it accepts null.

// Deprecated in PHP 8.4
function dt_get_title( string $title = null ) {}

// Correct
function dt_get_title( ?string $title = null ) {}

Removed Bundled Extensions (PHP 8.4)

Extensions including IMAP, Pspell, OCI8 and PDO_OCI were moved out of the PHP core distribution. This matters if a help desk, email-to-post or custom mailbox tool depends on IMAP. Check that your host still provides what you need.

Newer Deprecations (PHP 8.5)

PHP 8.5 deprecates several older habits, including the backtick operator and non-standard cast names such as (boolean) and (integer). Use (bool) and (int).

Deprecation, Warning or Fatal Error?

MessageMeaningPriority
Fatal errorPHP stopped running the requestFix before going live
WarningSomething is wrong, but the script may continueInvestigate before going live
DeprecatedIt works now but is scheduled to changePlan a fix; check that it is not breaking output

Do not edit a third-party plugin’s files directly, because the next update can overwrite your changes. Update it, report the problem to the developer, or replace it.

Check PHP Extensions and Settings

A new PHP version may not have the same extensions and settings as the old one. Compare them in Site Health before and after. Pay attention to:

  • Extensions such as mysqli, curl, dom, mbstring, xml, zip, intl, and imagick or gd
  • memory_limit
  • max_execution_time and max_input_vars
  • upload_max_filesize and post_max_size
  • OPcache and any object cache extension, such as Redis

How to Upgrade PHP on the Live Site

Once staging passes, choose a low-traffic time when you, or your developer, can watch the site.

  1. Take a fresh backup.
  2. Record the current PHP version and settings.
  3. Apply the same code and plugin fixes you tested on staging. Do not overwrite a live store database with the older staging database, or you may lose orders.
  4. Change the PHP version.
  5. Clear page, object and CDN caches. Reload PHP-FPM if you manage the server.
  6. Repeat your key tests.

Shared or Managed Hosting

Open your hosting panel, find the PHP version setting, select the version you tested and save. In cPanel this is often called MultiPHP Manager or Select PHP Version. In other panels it is usually under the website’s PHP or advanced settings. If you are unsure, ask support. For more on one popular host, read our Hostinger review.

VPS or Self-Managed Server

On a VPS, you are responsible for PHP. The exact commands depend on your operating system, package repository and control panel. The general process is:

  1. Install PHP 8.4 alongside 8.2 from a trusted, maintained repository.
  2. Install the required extensions for 8.4.
  3. Copy custom php.ini and PHP-FPM pool settings carefully. Do not blindly overwrite the new files.
  4. Point your staging virtual host to the 8.4 PHP-FPM socket and test.
  5. Validate the web server configuration, then switch the live site.
  6. Update CLI cron jobs that call an old PHP binary.
  7. Remove 8.2 only after you confirm nothing uses it.

Useful checks on a Linux server:

php8.4 -v
php8.4 -m
sudo systemctl status php8.4-fpm
sudo nginx -t          # Nginx
sudo apachectl configtest   # Apache (command name can vary)

What to Do If Your Site Breaks

php upgrade error troubleshooting
  1. Switch back to the previous PHP version from your hosting panel. This works even if wp-admin is unavailable.
  2. Check the logs. Find the first relevant fatal error. The file path often points to the plugin or theme involved.
  3. Isolate the problem. On staging, rename the suspected plugin’s folder, or use wp plugin deactivate plugin-name --skip-plugins --skip-themes.
  4. Fix and retest on staging before trying again.

Also check your email for a WordPress recovery mode link. WordPress can send one to the site administrator after some fatal errors. Rolling back to PHP 8.2 is a short-term measure only. Set a date to complete the upgrade.

SymptomLikely places to check
White screen or critical errorFatal error in logs, plugin, theme, missing extension
500 or 503 errorPHP-FPM service, server logs, handler or .htaccess rules
Checkout failsGateway and checkout plugins, browser console, WooCommerce logs
Emails or scheduled jobs stopSMTP settings, WP-Cron, server cron PHP path
Old version still showsPer-domain PHP setting, handler rules, PHP-FPM pool

After the Upgrade: Monitor Your Site

Check logs and key functions right after the switch, again the next day, and over the following week. Some tasks, such as renewals or weekly reports, run later. Watch uptime, orders, form leads, email delivery and cron jobs. Turn off debug logging when you finish.

Compare speed before and after, using the same pages and test tool. A newer PHP version does not guarantee a noticeably faster site, because images, scripts, database queries and caching also matter. If speed is still a problem, see our list of WordPress speed optimization plugins.

PHP Upgrade Checklist

  • ☐ Current PHP version checked for every site
  • ☐ Plugins, themes and custom code audited
  • ☐ Files and database backed up; restore method confirmed
  • ☐ WordPress, themes and plugins updated
  • ☐ Staging site protected; email and payments in safe mode
  • ☐ PHP extensions and limits compared
  • ☐ Compatibility scan and manual tests completed
  • ☐ Rollback plan written down
  • ☐ Live site switched and caches cleared
  • ☐ Logs, orders, forms and cron jobs monitored
  • ☐ Debug logging turned off and logs removed

Frequently Asked Questions

Will my WordPress site stop working after 31 December 2026?

Not just because of the date. But the PHP project will no longer fix security issues in 8.2, and software or hosts may later drop it.

Can I upgrade directly from PHP 8.2 to 8.4?

Yes. You do not need to run your site on 8.3 first. Review the changes in both 8.3 and 8.4, and test on staging.

Should I choose PHP 8.4 or 8.5?

For most existing sites, 8.4 is a sensible default. Choose 8.5 if your whole stack works with it and your tests pass.

Will changing the PHP version delete my content?

Changing the version does not itself delete posts or database content. Take a backup anyway, because updates and fixes made during the process can change data.

How long does the upgrade take?

The switch itself is usually quick. Auditing and testing take longer and depend on the number of plugins, the amount of custom code and the business functions on the site.

I am on PHP 7.4 or 8.1. Does this guide help?

Yes, but your upgrade needs more care because both are already past end of life. Also read the migration guides for every version you skip.

Final Thoughts

A PHP upgrade is routine maintenance when you treat it as a project: audit, back up, update, test and monitor. Start before the holiday period, particularly if you run an online store or manage client sites.

Need a second pair of hands? Take a look at our website maintenance and development services.

Last updated: 1 December 2026.

Farooque Hossain
Farooque Hossain

Farooque is a freelance WordPress developer and web consultant with 15+ years of experience. He builds fast, conversion-focused sites with WordPress, Elementor, and WooCommerce, and helps clients set up and manage AI agents on their own servers. He also runs DotThemes, selling Webflow and Framer templates. More at farooque.dev.

Articles: 65