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.
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.
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.
The chart above is historical. Use the live table on php.net supported versions when you plan an upgrade.
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:
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.
On WordPress requirements (last updated May 2026), the project recommends:
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+.
The PHP project labels each branch with two windows (php.net supported versions):
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.
Use at least one of these:
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.
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.
Before you change PHP:
WooCommerce, page builders, and membership plugins are the usual break points. Fix or replace anything that still demands PHP 7.x.
WP_DEBUG_LOG on staging only if you need detail.Our doc Why upgrade PHP walks through the business case. PHP version update explains what Security Ninja flags.
expose_php and other server leaks if tests still warn. See hide PHP version headers.We do not replace your host’s PHP selector. We make it obvious when the runtime is behind:
If you manage many client sites, fix PHP on staging once, export test results, and reuse the same playbook on the next site.
| Source | Recommendation |
|---|---|
| WordPress requirements | PHP 8.3+ recommended; 7.4+ legacy only |
| php.net supported versions | 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.
Found this useful? Share it.
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 .
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.
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.
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.
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.
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.
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.
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.
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.