---
title: WordPress PHP compatibility and versions
canonical: https://wpsecurityninja.com/wordpress-php-compatibility-and-versions/
---
WordPress is PHP. The admin, themes, and plugins are PHP files on a runtime your host provides. Every page load runs through that interpreter. The PHP branch on the server decides which security patches you actually get.

*Last updated: 18 November 2026.*

![PHP supported versions overview](https://wpsecurityninja.com/media/2019/09/php-currently-supported-versions.webp)

The chart above is historical. Use the live table on [php.net supported versions](https://www.php.net/supported-versions.php) when you plan an upgrade.

## PHP security advisories and what they mean for WordPress

A PHP security advisory is a published fix for a flaw in the PHP engine. WordPress core and plugins cannot patch the interpreter for you. Each advisory names affected builds and the point release that fixes them on branches that still have support.

For WordPress, old PHP still matters because:

- Exploits target the interpreter that runs every plugin and theme.
- After the security window closes on [php.net supported versions](https://www.php.net/supported-versions.php), that branch stops getting fixes.
- Current WordPress releases assume a supported runtime. Staying on end-of-life PHP forces you to keep older extensions.

Watch [php.net supported versions](https://www.php.net/supported-versions.php) for branch end dates, [PHP downloads](https://www.php.net/downloads.php) and release notes when your host patches PHP, and [WordPress requirements](https://wordpress.org/about/requirements/) (PHP 8.3+ in 2026).

When an advisory hits your exact build, upgrade on staging first, then move production in a quiet window. Re-run [security tests](https://wpsecurityninja.com/security-tests/) afterward. Security Ninja will flag unsupported PHP, but only your host can change the version.

## What WordPress asks for today

On [WordPress requirements](https://wordpress.org/about/requirements/) (last updated May 2026), the project recommends:

- **PHP 8.3 or greater**
- **MariaDB 10.11+** or **MySQL 8.4+**
- **HTTPS**

WordPress also states it still *works* on **PHP 7.4+** and **MySQL 5.5.5+**, but those releases are end of life. Keeping them is a known security debt, not a long-term choice.

For hosting that is still on PHP 7.4, copy the sample email on that requirements page and ask your provider to move you to PHP 8.3+.

## How PHP support dates work

The PHP project labels each branch with two windows ([php.net supported versions](https://www.php.net/supported-versions.php)):

1. **Active support** (about two years): bug and security fixes ship in regular point releases.
2. **Security-only support** (about two more years): only critical security issues get fixes, on an as-needed basis.

After that the branch is **end of life**. No more patches, even when researchers publish exploits.

As of November 2026, branches **8.2 through 8.5** are still within security support (8.2 until 31 December 2026, then only newer branches remain sensible for production). PHP **7.4 and 8.0 / 8.1** are already end of life.

Plan upgrades before the security window closes, not the day after a CVE hits the news.

## How to check your PHP version

Use at least one of these:

1. **WordPress Site Health:** *Tools → Site Health → Info → Server*. The PHP version row is what WordPress sees.
2. **Hosting panel:** PHP selector, MultiPHP, or similar. Confirm it matches Site Health.
3. **CLI on the server:** `php -v` shows the CLI build. It should match the web version, but on some hosts they differ. Trust Site Health for WordPress.

Write the full version down. "8.2" is not enough when a security bulletin names **8.2.29**.

## Why old PHP is a security problem

Vulnerabilities are fixed in **PHP itself**, not in WordPress core. When your host leaves you on PHP 7.4, you miss years of hardening that newer 8.x releases include.

Old PHP also pins you to old plugins. Authors stop testing on unsupported runtimes. You stay on vulnerable plugin versions because you cannot update.

That pairs with server-level bugs (for example issues in older PHP builds tied to file uploads). Running a patched PHP branch is part of [WordPress hardening](https://wpsecurityninja.com/wordpress-security-hardening-guide/), step one is keeping software current.

## WordPress and plugin compatibility

Before you change PHP:

1. Read each plugin's "Requires PHP" line on wordpress.org or in the plugin header.
2. Check your theme changelog for PHP 8.2 / 8.3 notes.
3. Run updates on staging while still on the old PHP, then switch PHP and test again.

WooCommerce, page builders, and membership plugins are the usual break points. Fix or replace anything that still demands PHP 7.x.

## Upgrade PHP safely

1. **Backup** files and database. Verify you can restore.
2. **Staging** clone with the same plugins and theme. If your host has no staging, use a temporary subdomain.
3. **Raise PHP on staging** one step (for example 8.1 → 8.3). Load front page, login, cart, and forms.
4. **Watch logs** for fatal errors. Enable `WP_DEBUG_LOG` on staging only if you need detail.
5. **Production** during a quiet window. Keep support and your host on standby.
6. **Re-run checks:** Site Health, [security tests](https://wpsecurityninja.com/security-tests/), and a quick [vulnerability scan](https://wpsecurityninja.com/vulnerabilities/).

Our doc [Why upgrade PHP](https://wpsecurityninja.com/docs/installation-and-usage/why-upgrade-php/) walks through the business case. [PHP version update](https://wpsecurityninja.com/docs/security-tests/php-version-update/) explains what Security Ninja flags.

## After you upgrade

- Re-run Security Ninja tests. The PHP version test should pass on a supported branch.
- Remove `expose_php` and other server leaks if tests still warn. See [hide PHP version headers](https://wpsecurityninja.com/docs/security-fixes/hide-php-version/).
- Schedule the next review before your branch hits end of life. PHP 8.2's security support ends 31 December 2026; plan the next jump before year end if you still run 8.2.

## When Security Ninja fits in

We do not replace your host's PHP selector. We make it obvious when the runtime is behind:

- The **PHP version** item in [security tests](https://wpsecurityninja.com/security-tests/) fails on unsupported releases.
- The **PHP version update** test doc explains what to change.
- The broader [hardening guide](https://wpsecurityninja.com/wordpress-security-hardening-guide/) treats current PHP as part of weekly maintenance.

If you manage many client sites, fix PHP on staging once, export test results, and reuse the same playbook on the next site.

## Quick reference (November 2026)

| Source | Recommendation |
| --- | --- |
| [WordPress requirements](https://wordpress.org/about/requirements/) | PHP **8.3+** recommended; 7.4+ legacy only |
| [php.net supported versions](https://www.php.net/supported-versions.php) | Use a branch still in **active** or **security** support |
| Your host | Must offer the version you choose in the panel |
| Your stack | Theme + plugins must list that PHP version |

Staying current on PHP is unglamorous work. It is also one of the fastest ways to close holes that no security plugin can paper over.
