EOL Hub

How to update the PHP version on WordPress safely

Short answer: back up your site, update WordPress, themes and plugins, check plugin compatibility, then switch to PHP 8.3 or newer in your hosting control panel (or ask your host). Test the site and keep the old version available until you're sure. WordPress.org recommends PHP 8.3 or greater.[1][2]

Why update PHP on WordPress?

PHP is the language WordPress runs on, and your host decides which PHP versions you can use. Keeping PHP current is as important as updating WordPress itself.[2] Old PHP branches stop getting security fixes: PHP 8.1 and older are end-of-life, and PHP 8.2 reaches end of life on Dec 31, 2026.[4] WordPress still runs on PHP 7.4, but WordPress.org warns that end-of-life versions may expose your site to security vulnerabilities.[1]

Which PHP version does WordPress support?

According to the WordPress Core Handbook, WordPress 7.0 and 7.1 support PHP 7.4 through 8.5. WordPress 6.9 supports PHP 7.2 through 8.5, and WordPress 7.0 dropped PHP 7.2 and 7.3.[3] Your plugins and theme may not keep up, so test them.

How do I update PHP on WordPress step by step?

  1. Check your current version. In the WordPress dashboard go to Tools > Site Health > Info, open Server and find PHP version.[2]
  2. Make a full backup of files and database, and confirm you can restore it. To restore later you'll also need to switch PHP back.[2]
  3. Update WordPress, themes and plugins from Dashboard > Updates, then check that the site still works.[2]
  4. Check compatibility. WordPress.org suggests the PHP Compatibility Checker plugin, while noting it can miss issues or flag false positives. Ask the developer of any flagged plugin or theme, or replace it.[2]
  5. Test on staging first if your host offers it. Copy the site, switch the copy's PHP version, and click through key pages, forms, checkout and logins.
  6. Switch PHP in your hosting control panel (often called "PHP version", "PHP selector" or "MultiPHP"), or email your host and ask them to do it.[2]
  7. Verify. Recheck Site Health, load your important pages, and look at the error log. Then confirm the exact version is patched: 8.5.12, 8.4.27, 8.3.36 or 8.2.35 or newer, or your host's patched package.[5]
  8. Roll back if something breaks. Switch PHP back in the panel or ask your host, then restore your backup if needed.[2]

What should I ask my host?

Copy and adapt this:

Hi, please confirm which PHP version my site uses and whether it includes
the Oct 21, 2026 fixes for CVE-2026-109618 and CVE-2026-109619
(PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or your patched package).
I'd also like to move to PHP 8.3 or newer. How do I do that, and can I
test it on staging first? Thanks.

What if my site breaks after the update?

Switch back to the previous PHP version first so the site is up, then find the cause. The usual culprit is an outdated plugin or theme. Update or replace it, then try again. If you can't log in, your host can change the PHP version for you.[2]

Frequently asked questions

What PHP version should I use for WordPress?

WordPress.org recommends PHP 8.3 or greater. WordPress 7.0 and 7.1 are compatible with PHP 7.4 through 8.5, but older PHP branches are end-of-life.

Will updating PHP break my WordPress site?

Usually not, but WordPress.org says it can't guarantee your themes and plugins will work. Back up, check compatibility and test first, and keep a way to switch back.

How do I check my WordPress PHP version?

Go to Tools, Site Health, Info, then open the Server section and look for PHP version.

Can I update PHP myself on shared hosting?

Often yes, from your host's control panel. If you can't find the setting, ask your host to change it.

Sources for this page

  1. WordPress.org: Requirements
  2. WordPress.org: Update PHP
  3. WordPress Core Handbook: PHP Compatibility and WordPress Versions (updated Aug 19, 2026)
  4. PHP.net: Supported Versions (checked Oct 24, 2026)
  5. PHP.net: Security advisory, critical remote code execution vulnerabilities, update now (Oct 21, 2026)