WordPress PHP version: which to use and how to change it

WordPress recommends PHP 8.3 or newer and still runs on 7.4+, and for security your site should be on PHP 8.4 or 8.3 with the October 21, 2026 release (8.4.28 or 8.3.37). PHP 8.1 and older get no security fixes at all.

See what your site runs now with our free PHP version checker, and what the latest PHP flaw needs in PHP2Shell fixed versions.

Read-only: one standard page request, like a browser visit. We never send attack traffic.

Check your PHP version in WordPress

  1. In the WordPress dashboard go to Tools, then Site Health.
  2. Open the Info tab and expand Server.
  3. Read PHP version. Compare it with the table below.

Which PHP versions WordPress supports

WordPressPHP versions supported
7.1PHP 7.4 to 8.5
7.0PHP 7.4 to 8.5
6.9PHP 7.2 to 8.5
6.8PHP 7.2 to 8.4
6.7PHP 7.2 to 8.4
6.6PHP 7.2 to 8.3

From WordPress's PHP compatibility table, checked October 22, 2026. Supported by WordPress doesn't mean safe: PHP itself stopped fixing 8.1 and older.

Which PHP versions still get security fixes

PHPLatest releaseSecurity fixes until
PHP 8.58.5.13Dec 31, 2029
PHP 8.48.4.28Dec 31, 2028
PHP 8.38.3.37Dec 31, 2027
PHP 8.28.2.36Dec 31, 2026
PHP 8.1 and olderNo fixesEnded

The overlap of both tables is PHP 8.2 to 8.5. PHP 8.2's security support ends Dec 31, 2026, so PHP 8.4 or 8.3 is the safe choice for current WordPress.

Change it at your host

After switching, load the home page, log in to wp-admin, and test your forms and checkout. If something breaks, switch back and update the plugin or theme that failed first. Every panel and server, step by step: how to update your PHP version.

What PHP2Shell means for WordPress

PHP2Shell (CVE-2026-109618 and CVE-2026-109619) is a flaw in PHP, so updating WordPress, plugins or a security plugin doesn't fix it. Your site needs PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35 or newer. Details: PHP2Shell and WordPress.

Want it handled? With Patch watch ($149 a month per site) we apply PHP, WordPress, plugin and theme security updates for you and test the site after each. See WordPress maintenance.

Questions

What PHP version does WordPress need?

WordPress recommends PHP 8.3 or newer. It still runs on PHP 7.4 and up, but WordPress itself says those older versions have reached end of life and may expose your site to security vulnerabilities.

What PHP version should my WordPress site use?

PHP 8.4 or 8.3, on the October 21, 2026 release (8.4.28 or 8.3.37). Both are supported by current WordPress and get PHP security fixes until Dec 31, 2028 and Dec 31, 2027.

Can I change the PHP version from inside WordPress?

No. WordPress shows the version under Tools, Site Health, but PHP is set in your hosting account, so that's where you change it.

Does updating WordPress fix PHP2Shell?

No. PHP2Shell is in PHP, not WordPress. The fix is a PHP update at your host.