PHP 7.4 is end of life: what breaks in WordPress when you move to PHP 8
PHP 7.4 stopped receiving security fixes on 28 November 2022. A site still on it in 2026 is running four years of unpatched vulnerabilities, and WordPress itself now recommends PHP 8.3. The move to PHP 8 is the largest jump in PHP's history for old plugin code; here is what changes, by version, and what it does to a typical WordPress site.
PHP 8.0 (fatal changes)
- Built-in functions throw
TypeErroron wrong argument types.count('string'),array_merge(null),strpos(array). These were warnings in 7.x; now they stop the page. The most common PHP 8 fatal in WordPress plugins. - Removed functions:
each(),create_function(),money_format(),restore_include_path(),hebrevc(),convert_cyr_string(). implode()argument order: the oldimplode($array, $glue)form is gone.- Removed extensions:
mysql_*functions (gone since 7.0, but code guarded byfunction_existsstill lingers),ereg_*. - Saner string/number comparison:
0 == 'abc'is now false. Rare in plugins; devastating when present.
PHP 8.1 (deprecations)
- Passing
nullto built-in string functions:strlen(null),trim(null),htmlspecialchars(null). The most common 8.1 notice; it comes from option values that were never saved. Serializablewithout__serialize;$GLOBALSrestrictions;FILTER_SANITIZE_STRING.
PHP 8.2 (deprecations)
- Dynamic properties: a class writing
$this->foowithout declaring$foo. One line per class, hundreds per site. ${var}string interpolation;utf8_encode()/utf8_decode();self::/parent::as callable strings.
PHP 8.3 (deprecations, few)
get_class()without argument; unserialize failures now raiseE_WARNING.
PHP 8.4 (deprecations)
- Implicitly nullable parameters:
function f(Type $x = null)must become?Type $x = null. Every plugin written before 2024 has some. - Removed constants
E_STRICT,CURLOPT_BINARYTRANSFER;mysqli_ping();E_USER_ERRORintrigger_error();fgetcsv()requires the$escapeparameter.
PHP 8.5 (November 2026)
- Casts
(integer),(boolean),(double),(binary)deprecated in favour of the short forms; backtick shell execution deprecated; several*_close()functions (curl_close,imagedestroy,finfo_close) become no-ops.
What this means for a site
A site that worked on 7.4 and has not had its plugins updated since will, on PHP 8.x: fail outright on one or two plugins (8.0 fatals), and write thousands of deprecation notices from a dozen others (8.1-8.4). The fatals are what you must fix before switching; the notices are the list of plugins to replace over the next year.
Find both before switching: Upgravo scans every installed plugin and theme against the target version and reports Breaks and Notices separately, per plugin with file and line.
Install it from WordPress.org: Upgravo – PHP Compatibility Check.
Which version to move to
Skip 8.0 and 8.1: both are past security support. Go to 8.3 (fixes until end of 2027) or 8.4 (end of 2028). The jump from 7.4 to 8.3 is not harder than to 8.0; the fatal changes all happened in 8.0 and everything after is deprecations.
Sources
More guides
- "Deprecated: Creation of dynamic property" in WordPress – what it means and how to fix it
- "Implicitly marking parameter as nullable is deprecated" – PHP 8.4 and WordPress plugins
- "Uncaught TypeError: … must be of type …" – why PHP 8 turns old warnings into fatal errors
- "There has been a critical error on this website" after a PHP update
- PHP Compatibility Checker is abandoned – what to use instead
- WordPress debug.log full of "Deprecated" notices – should you worry?
- My host forced a PHP upgrade and broke my WordPress site
- How to check if your WordPress plugins are compatible with PHP 8.3 or 8.4 before upgrading