askharrison.co.uk
← All Articles UK Region PHP WordPress Upgrades Security

PHP 8.2 & 8.3 Upgrade Checklist for Legacy WordPress Sites

How UK web agencies can safely upgrade client WordPress installations from EOL PHP 7.4/8.0 to PHP 8.3 without fatal errors or broken plugins.

By Harrison

Running client WordPress sites on legacy PHP versions (such as PHP 7.4 or 8.0) is a major liability. Official security support for PHP 7.4 ended in November 2022, as documented on the PHP.net Supported Versions page, and PHP 8.0 reached End-of-Life (EOL) in late 2023. Hosts are now charging “legacy PHP extension fees” or forcefully upgrading PHP versions, often breaking custom client sites overnight.

Here is my agency pre-flight checklist for upgrading WordPress sites to PHP 8.2 and PHP 8.3 safely.

Common Breakages in PHP 8.x Upgrades

PHP 8 introduced strict typing and deprecated legacy dynamic properties, causing errors that were previously soft warnings to become fatal Uncaught TypeError or Fatal error exceptions.

// Fatal error in PHP 8.0+ when passing null to built-in string functions
// PHP 7.4 (Warning): strlen(null) -> 0
// PHP 8.0+ (Fatal Error): TypeError: strlen(): Argument #1 ($str) must be of type string, null given
$len = strlen($uninitialized_var); 

Key Culprits to Check:

  1. Deprecated Function Signatures: Passing null to non-nullable parameter functions (strlen, str_replace, explode). Refer to the PHP.net Deprecated Features guide for specific function signature changes.
  2. Outdated Plugins: Unmaintained utility plugins or custom agency code written prior to 2020.
  3. Legacy Theme Frameworks: Older versions of WPBakery, Avada, or custom functions.php file hooks.
  4. Obsolete MySQLi / PDO code: Direct database queries bypassing $wpdb. Check against official WordPress Developer Resources.

The PHP Upgrade Checklist for Agencies

1. Run PHP Compatibility Scanner in Staging

Never toggle the PHP version selector in cPanel or Plesk on a live production site without testing first.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

2. Audit Deprecated Code: Fix, Don’t Suppress

Many developers attempt to suppress PHP 8 warnings using @ or error_reporting(E_ALL & ~E_DEPRECATED). This is a temporary band-aid that masks memory leaks and compatibility failures.

// Before (Fails in PHP 8.x if $_POST['setting'] is unset)
$value = $_POST['setting'];

// After (PHP 8 safe)
$value = $_POST['setting'] ?? '';

3. Benchmark Optimisations and Verify OpCache

Upgrading to PHP 8.3 brings notable performance benefits, including reduced memory usage and enhanced JIT (Just-In-Time) compilation for computationally heavy queries.

Benchmark ParameterPHP 7.4 (EOL)PHP 8.3 (Supported)Impact
TTFB (Time to First Byte)1,840 ms310 ms83% faster response
PHP Notices / hr412 notices0 errorsClean error log
Security StatusVulnerableFully PatchedCompliant & secure

Need Fixed-Price PHP Upgrades for Client Sites?

If you manage a backlog of agency client sites running on legacy PHP 7.4 or 8.0, I provide fixed-price PHP Version Upgrades starting at £395 per site. Every upgrade is tested on staging, verified against error logs, and backed by a 30-day warranty.

WordPress & Server Specialist

Need expert help with your WordPress site?

I specialize in fixed-price WordPress migrations, PHP upgrades, and emergency hacked site recoveries for site owners and web agencies.

Email Harrison →