The FBI says over 1,000 hacked WordPress sites hid ransomware lures in Google. You can open yours and see a normal page.

Details

WordPress PHP compatibility and versions

Which PHP version WordPress needs in 2026, how to check what your site runs, why old PHP is a security risk, and how to upgrade without breaking plugins.

Topics Beginner guides Hardening & checklists

Updated Published

WordPress PHP compatibility and versions Open larger image: 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

The chart above is historical. Use the live table on php.net supported versions 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, 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 for branch end dates, PHP downloads and release notes when your host patches PHP, and WordPress 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 afterward. Security Ninja will flag unsupported PHP, but only your host can change the version.

What WordPress asks for today

On WordPress 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):

  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, 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, and a quick vulnerability scan.

Our doc Why upgrade PHP walks through the business case. 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.
  • 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 fails on unsupported releases.
  • The PHP version update test doc explains what to change.
  • The broader 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)

SourceRecommendation
WordPress requirementsPHP 8.3+ recommended; 7.4+ legacy only
php.net supported versionsUse a branch still in active or security support
Your hostMust offer the version you choose in the panel
Your stackTheme + 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.

Found this useful? Share it.

Frequently asked questions

What PHP version does WordPress require in 2026? +

WordPress.org recommends PHP 8.3 or greater for new installs, with MariaDB 10.11+ or MySQL 8.4+ and HTTPS. WordPress still runs on PHP 7.4+ and MySQL 5.5.5+, but those stacks are past official end of life and are not safe to keep in production. See WordPress requirements .

How do I check my WordPress site's PHP version? +

In wp-admin open Tools → Site Health → Info → Server and read the PHP version line. Your hosting control panel or SSH `php -v` shows the same number the web server uses. Match that full version (for example 8.2.29), not just the major number.

Why is running an old PHP version dangerous? +

PHP branches stop getting security fixes after their support window closes. Attackers target known holes in PHP itself, not only in plugins. Outdated PHP also blocks theme and plugin updates that assume a current runtime.

How do I upgrade PHP without breaking my site? +

Take a full backup, clone to staging, switch PHP there first, then load the home page, wp-admin, checkout (if you use WooCommerce), and cron. Update plugins and themes before or right after the switch. Move production only when staging is clean.

Does Security Ninja check PHP version? +

Yes. The free security tests include a PHP version check. When the runtime is behind a supported release, you get a failed test and a link to our doc on PHP version update . Read Why upgrade PHP for the full picture.

Should I pick PHP 8.3, 8.4, or 8.5? +

Pick the newest PHP release your host actively supports with security updates, as long as your theme and plugins list it as compatible. WordPress recommends 8.3+. PHP 8.2 still receives security-only support until 31 December 2026 per php.net . Avoid versions that already reached end of life.

Is WordPress PHP? +

WordPress is written in PHP and needs a PHP runtime on the server. The admin area, themes, and plugins are PHP code. Your hosting stack also includes a web server and MySQL or MariaDB, but PHP is the language that runs WordPress itself.

Does WordPress use PHP? +

Yes. Every WordPress request is handled by PHP on the server. Core, themes, and plugins are PHP files. That is why your PHP branch and its security support dates matter as much as updating WordPress and plugins.

What are PHP security advisories? +

They are official notices from the PHP project when a security flaw is fixed in a PHP release. Each advisory maps to patched versions on a supported branch. WordPress cannot patch PHP for you. You upgrade PHP through your host when advisories affect your runtime.

Larger screenshot

Enlarged image