PHP 8.2 reaches end of life on 31 December 2026 — that is the day the PHP project stops shipping security fixes for it. Your WordPress site will not go dark the next morning, but php.net's own wording for an end-of-life release is that users "may be exposed to unpatched security vulnerabilities" and "should upgrade as soon as possible."
You may also have less time than the calendar suggests. One hosting platform, WP Cloud, removes PHP 8.2 on 15 December 2026, ahead of the official date. As developer Bo Zeng put it in a dev.to write-up on running WordPress plugins on PHP 8.4, "the hosting company is going to move you to 8.3 or 8.4 sooner or later."
So the first step is simple: find out which PHP version your site runs. About 22% of WordPress sites reporting their version to WordPress.org are on 8.2, with roughly 14% still on 7.4 and 9% on 8.1. Here are three ways to check yours, fastest first.
1. WP Admin → Tools → Site Health → Info → Server
No code needed.
- Log in to your WordPress dashboard.
- Open Tools → Site Health → Info.
- Expand the Server section. Per the WordPress documentation, it "shows information about your server architecture, web server, various PHP variables" — including the PHP version.
Then check the Status tab on the same screen. If WordPress considers your PHP outdated, it shows a security item: "Your site is running an outdated version of PHP, which requires an update."
Write the number down. If it reads 7.4, 8.0 or 8.1, you are already on an end-of-life version that WordPress supports "for backward compatibility only," and the rest of this applies with more urgency.
One caveat: knowing the version does not mean you can change it. WordPress notes that "you may need to contact your hosting provider, as these configurations are often restricted or managed at the server level."
2. WP-CLI
If you have SSH access and WP-CLI installed, run this from the site's root directory (where wp-config.php lives):
wp --info It prints the environment, including the PHP version. To get just the version number:
wp eval 'echo PHP_VERSION;' # 8.2.15 3. From outside: read X-Powered-By with a small Python script
No WordPress login at all? Some servers announce PHP in the X-Powered-By response header. This script checks it using only the Python standard library:
#!/usr/bin/env python3 """Print the X-Powered-By header of a site (often reveals the PHP version).""" import sys from urllib.request import Request, urlopen def powered_by(url: str) -> str: req = Request(url, headers={"User-Agent": "php-version-check/1.0"}) with urlopen(req, timeout=10) as resp: return resp.headers.get("X-Powered-By", "") if __name__ == "__main__": url = sys.argv[1] if len(sys.argv) > 1 else input("URL: ").strip() value = powered_by(url) print(value or "(no X-Powered-By header — this host hides it)") python3 check_php.py https://your-site.example Be aware that many hosts deliberately strip or hide this header, so a blank result tells you nothing either way. In that case, fall back to Site Health or ask the host directly.
What tends to break on upgrade
Knowing your version is step one. Here is what actually fails when PHP moves up, drawn from Zeng's public scan of two real plugins — an events plugin with 50 PHP files and a social feed plugin with 46:
- WordPress core is rarely the problem. Core has been compatible with PHP 8.3 since WordPress 6.4 and with 8.4 since 6.7. The catch, in the same documentation, is that WordPress "is rarely used in isolation (without any theme or plugins)" — themes and plugins are where upgrades break.
- Failures are quiet, not white screens. The events plugin produced zero fatal errors, but 17 items that can fail on unexpected input and 5 deprecation warnings.
- Date handling. Since PHP 8.3,
DateTime::modify()throws aDateMalformedStringExceptionwhen it can't parse the string, instead of failing quietly. - Dynamic properties. A pattern older plugin code uses everywhere, deprecated in PHP 8.2.
- Warnings that become errors later. The social feed plugin runs on PHP 8.4 with one deprecation warning that "will fill the error log and break in a later PHP version."
- Subtle behaviour changes. PHP's 8.3 migration notes go down to details like: assigning a negative index
$nto an empty array now makes the next index$n+1instead of0.
And fixing is not mechanical. Zeng refused to auto-apply one fix because it "would turn a deprecation notice on PHP 8.4 into a parse error on PHP 7.0" — on date handling, "a person has to decide what the right fallback is."
Test on staging before anyone touches production
Whoever does the upgrade — host, freelancer or agency — the order should be:
- Take a full backup of files and database.
- Copy the site to a staging environment.
- Update WordPress core, the theme and every plugin on staging.
- Switch staging to the target PHP version. WordPress recommends "PHP version 8.3 or greater," and its hosting handbook recommends 8.4 or later for production; 8.3 receives security fixes until 31 December 2027, 8.4 until 31 December 2028.
- Fix whatever the error log and a code scan flag, plugin by plugin.
- Click through the site on the new version — forms, checkout, search, logins. In the scan author's words: "Run your tests and click through the plugin on the target PHP version after fixing."
- Only then switch the live site, and watch the error log for a few days.
The WordPress hosting handbook asks hosts to "test their full stack before making a new PHP version the default for production environments." Hold your own site to the same standard.
If Site Health shows 8.2 or lower, the deadline is real but there is still time to do this properly. For the decision that comes next — upgrade the site you have or rebuild it, and what to ask anyone who quotes for the work — see the full upgrade-or-rebuild guide.
Posted from the Mantis team account under the Gigzman organization. Gigzman is a web and app development agency founded by Tarun Kumar.
