The best PHP version for WordPress in 2026

By CompatNav · Published · Last reviewed · 3 min read

Short answer

PHP 8.3 or newer. wordpress.org recommends PHP 8.3 or greater; WordPress still runs on 7.4, but that and every version up to 8.1 no longer get security fixes, and 8.2’s fixes end on 31 December 2026. Between 8.3, 8.4 and 8.5, choose the newest one your plugins, theme and host support: PHP 8.5 gets security fixes until 31 December 2029, 8.4 until 2028, 8.3 until 2027. Check your plugins and theme for that version before switching.

What WordPress requires and recommends

wordpress.org’s requirements page: “To run WordPress, it’s recommended your host supports: PHP version 8.3 or greater.” And for older setups: “If you are in a legacy environment where you only have older PHP or MySQL versions, WordPress also works with PHP 7.4+ and MySQL 5.5.5+. However, these versions have reached their official End Of Life and may expose your site to security vulnerabilities.” (wordpress.org)

The WordPress core team’s compatibility page lists WordPress 7.1 as compatible with every version from PHP 7.4 to 8.5. So WordPress itself is not what limits your choice: your plugins, your theme and your host are.

How long each version gets fixes

Each PHP version gets two years of bug fixes, then two years of security fixes only (php.net). For the versions a WordPress site can use today:

PHP versionSecurity fixes untilStatus in October 2026
7.4ended 28 November 2022No fixes
8.0ended 26 November 2023No fixes
8.1ended 31 December 2025No fixes
8.231 December 2026Ending this year
8.331 December 2027Security fixes
8.431 December 2028Bug and security fixes
8.531 December 2029Bug and security fixes

Dates from php.net’s supported versions and end of life pages. What the end of 8.2 means in practice is in PHP 8.2 reaches end of life.

How to choose: newest that’s ready

  1. Find your current version: Tools → Site Health → Info → Server. Checking and changing your PHP version shows where.
  2. See what your host offers: the PHP setting in your hosting panel lists the versions you can choose.
  3. Check your plugins and theme for the newest one. CompatNav, for example, reads the code of every plugin and theme on your server and lists what will break and what only shows notices on the version you choose.
  4. Not ready for the newest? Check the next one down. 8.3 is the smallest step that still gets fixes after this year.
  5. Switch, then watch your error log for a few days: some problems only appear with real data.

What changes on the way

Each version between yours and the target applies its changes, so the step from an old version is bigger than it looks:

Key takeaways

  • wordpress.org recommends PHP 8.3 or greater. WordPress 7.1 is compatible with PHP 7.4 to 8.5.
  • Security fixes end: PHP 8.2 on 31 December 2026, 8.3 on 31 December 2027, 8.4 on 31 December 2028, 8.5 on 31 December 2029 (php.net).
  • PHP 8.1 and older no longer get security fixes at all.
  • The best version for your site is the newest one your plugins, theme and host support.
  • Each step up can stop old code or add notices: check your plugins and theme before switching.

Frequently asked questions

What is the minimum PHP version for WordPress?

WordPress works with PHP 7.4 and later; wordpress.org adds that such older versions “have reached their official End Of Life”. The recommendation is PHP 8.3 or greater.

Is PHP 8.5 too new for WordPress?

Not for WordPress itself: the core team lists WordPress 6.9 and later as compatible with PHP 8.5. Whether your site is ready depends on your plugins and theme; check them for 8.5 first, and choose 8.4 or 8.3 if something isn’t ready yet.

Does a newer PHP version make my site faster?

wordpress.org says updating to the recommended version “can deliver a performance increase”. How much depends on your site; security fixes are the reason that always applies.

My host only offers older versions. What now?

Ask them which newer versions they plan to offer and when. If they can’t offer at least a supported version, that is a reason to consider another host.

Check your own site before you upgrade

CompatNav is a free WordPress plugin. It reads the code of your plugins and themes on your own server and tells you, in plain words, what will break and what will only show notices on the PHP version you choose. It never changes your code. It can’t see problems that only appear while code runs with real data, so a quick check of your site after the upgrade still matters.

Get CompatNav on wordpress.org How it works

Sources

About the code examples: each output is the real output of the code shown, run with the official PHP builds, without a php.ini, with all errors reported and displayed. Only the file path was replaced by a neutral server path.