My host forced a PHP upgrade and broke my WordPress site
Hosts retire PHP versions when PHP stops patching them, and many move every site to a newer version automatically with a few weeks' notice by email. If your site broke on a day you changed nothing, this is the usual cause. The fix is the same as any PHP upgrade; the difference is that you have to prepare for the next one, because it will happen again.
Confirm it was PHP
- Site Health (Tools → Site Health → Info → Server) shows the PHP version now running.
- The host's status page, or the email you missed ("PHP 8.1 end of life", "we are upgrading your sites to PHP 8.3").
- The error in the log mentions a removed function, a
TypeErroror aValueError: all PHP-version symptoms.
Get the site back
Most hosts let you choose the PHP version per site even after the forced move, for a limited time. cPanel: MultiPHP Manager. Plesk: PHP Settings. Managed hosts: the site's Tools or Settings page. Select the previous version; the site returns in a minute.
If the previous version is gone from the selector, the host has retired it. Then: deactivate the failing plugin (name from the error log; rename its folder over SFTP if the admin is down), and fix or replace it.
Why the host did this
PHP versions receive security fixes for a fixed period (since 2024: two years of active support plus two of security fixes). After that, a host running them is running known vulnerabilities. Current dates:
| PHP | Security fixes until |
|---|---|
| 8.1 | 31 December 2025 (already over) |
| 8.2 | 31 December 2026 |
| 8.3 | 31 December 2027 |
| 8.4 | 31 December 2028 |
So PHP 8.2 sites will be moved during 2027, 8.3 sites during 2028. The next forced upgrade has a date.
Prepare for the next one
- Read the host's notice. It names the target version and the date.
- Scan before the date. Run a compatibility scan against the target version as soon as the notice arrives; you then have weeks to update or replace what it flags instead of an outage.
- Test on staging with the target version for runtime errors a scan cannot see.
- Switch yourself, early. A site you moved on a Tuesday morning with the log open is a different experience from one the host moved at 3 a.m.
Upgravo checks every installed plugin and theme against the target PHP version and lists what breaks and what only warns, per plugin with file and line. For sites you maintain for other people, the Pro version runs the scan on a schedule and emails you when an update introduces an incompatibility, so the warning arrives before the host's deadline does.
Install it from WordPress.org: Upgravo – PHP Compatibility Check.
Sources
- PHP supported versions
- WordPress.org support: "The hosting unexpectedly changed the php version to 8.2"
- HestiaCP forum: WordPress fatal error after update php
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?
- How to check if your WordPress plugins are compatible with PHP 8.3 or 8.4 before upgrading
- PHP 7.4 is end of life: what breaks in WordPress when you move to PHP 8