Upgrading WordPress from PHP 8.1 to 8.3: step by step
Short answer
PHP 8.1 reached its end of life on 31 December 2025, and the October 2026 security release didn’t include it. Moving to PHP 8.3 crosses two versions, 8.2 and 8.3, and neither has a common change that stops a page: CompatNav’s 9 checks for this move all find deprecation notices, such as dynamic properties and utf8_encode(). The steps: check every plugin and your theme for 8.3, update what has updates, switch at a quiet time, then keep the error log for a week to catch what depends on data. PHP 8.3 gets security fixes until 31 December 2027.
Why move now
PHP 8.1’s security support ended on 31 December 2025 (php.net). When the PHP2Shell flaws were fixed on 21 October 2026, releases came for 8.2 to 8.5 only (what to do). A site on 8.1 relies on its host’s backports, if any.
What changes on the way
| Step | What CompatNav checks | Can it stop a page? |
|---|---|---|
| 8.1 → 8.2 | Dynamic properties, ${var} in strings, utf8_encode() and utf8_decode(), self:: in callables, HTML-ENTITIES in mbstring | No, deprecation notices |
| 8.2 → 8.3 | get_class() without arguments, assert_options(), ASSERT_* and MT_RAND_PHP, return types of built-in methods | No, deprecation notices |
What no code check sees: in PHP 8.3, an invalid date in DateTime::modify() throws an exception that can stop a page, depending on the value (WordPress and PHP 8.3). That’s what the week of watching the log is for.
The notice you’re most likely to see, from PHP 8.2:
wp-content/plugins/newsletter-box/includes/class-newsletter-box.php
<?php
class Newsletter_Box {
public function __construct() {
$this->title = 'Subscribe to our newsletter';
}
}
$box = new Newsletter_Box();
echo $box->title, "\n";
Subscribe to our newsletterDeprecated: Creation of dynamic property Newsletter_Box::$title is deprecated in /var/www/html/wp-content/plugins/newsletter-box/includes/class-newsletter-box.php on line 4
Subscribe to our newsletterDeprecated: Creation of dynamic property Newsletter_Box::$title is deprecated in /var/www/html/wp-content/plugins/newsletter-box/includes/class-newsletter-box.php on line 4
Subscribe to our newsletterDeprecated: Creation of dynamic property Newsletter_Box::$title is deprecated in /var/www/html/wp-content/plugins/newsletter-box/includes/class-newsletter-box.php on line 4
Subscribe to our newsletterDeprecated: Creation of dynamic property Newsletter_Box::$title is deprecated in /var/www/html/wp-content/plugins/newsletter-box/includes/class-newsletter-box.php on line 4
Subscribe to our newsletterStep by step
- Back up, and use a staging copy if your host offers one (how).
- Check every plugin and your theme for PHP 8.3. CompatNav, free on wordpress.org, reports only what changes between 8.1 and 8.3: its 9 checks for 8.2 and 8.3.
- Update what has an update; send the rest to the developers. Notices can wait; anything marked “Will break” can’t.
- Log PHP messages instead of displaying them (the debug log), so notices don’t appear on your pages.
- Switch to 8.3 in your hosting panel (cPanel, Plesk and others).
- Test forms, checkout, login and the admin area, and read the log for a week.
Each notice on the way has its own fix: dynamic properties, utf8_encode(), get_class(). Coming from 7.4 or 8.0 instead: upgrade from PHP 7.4, 8.0 or 8.1.
Key takeaways
- PHP 8.1: no security fixes since 31 December 2025, and no official PHP2Shell release.
- 8.1 to 8.3 crosses 8.2 and 8.3; CompatNav runs 9 checks for it, all for deprecation notices.
- The most common notice on the way: “Creation of dynamic property … is deprecated” (PHP 8.2).
- Some PHP 8.3 changes depend on data, so keep the error log on after switching.
- PHP 8.3 gets security fixes until 31 December 2027; 8.4, one year longer.
Frequently asked questions
Why 8.3 and not 8.2?
PHP 8.2’s security fixes end on 31 December 2026. Going to 8.2 now means another move in two months.
Can I go to 8.4 directly?
Yes, if the check for 8.4 comes out clean: it adds PHP 8.4’s changes, including five removed MySQLi constants that stop a page. 8.4 gets fixes until the end of 2028.
Will deprecation notices break my site?
No: they’re written to the log and the page keeps working. Log them instead of displaying them, and let plugin updates fix them over time.
Check your own site before you upgrade
CompatNav is a free WordPress plugin. It reads the code of your plugins and themes on your own server and tells you, in plain words, what will break and what will only show notices on the PHP version you choose. It never changes your code. It can’t see problems that only appear while code runs with real data, so a quick check of your site after the upgrade still matters.
Sources
- php.net: Supported Versions
- php.net: Deprecated features in PHP 8.2.x
- php.net: Deprecated features in PHP 8.3.x
About the code examples: each output is the real output of the code shown, run with the official PHP builds, without a php.ini, with all errors reported and displayed. Only the file path was replaced by a neutral server path.