Skip to content
HostEthical
All guides

Web hosting 11 min read ·

Which PHP Version for WordPress in 2026? PHP 8.2 Ends 31 Dec

Which PHP version should WordPress use in 2026? PHP 8.2 support ends 31 December. See the EOL dates, what WordPress 7 recommends and how to upgrade safely.

For most WordPress sites in October 2026, the best PHP version is PHP 8.4, with PHP 8.3 as the safe fallback if an older plugin isn't ready. PHP 8.2 stops getting security fixes on 31 December 2026, and PHP 8.1 and older get no fixes at all. Below are the support dates, what WordPress 7 asks for, and a step-by-step way to upgrade without taking your site down.

Which PHP version is best for WordPress?

Match the version to the site you have:

  • A new site, or an existing site with up-to-date plugins: PHP 8.4. It gets bug fixes until the end of 2026 and security fixes until 31 December 2028.
  • A new site where the theme and every plugin state support for it: PHP 8.5 is fine, and it is supported the longest, until the end of 2029.
  • An older site with a plugin that hasn't been updated in a while: PHP 8.3, which has security fixes until 31 December 2027. Use that time to replace the plugin.
  • Any site on PHP 8.2 or older: move it before 31 December 2026.
  • Never choose PHP 8.1, 8.0 or 7.4 for a live site. All three are end of life.

Why 8.4 rather than the newest version? WordPress core is fully compatible with both, but plugins and themes catch up on their own schedule. PHP 8.4 came out in November 2024, so plugin authors have had almost two years to test against it. PHP 8.5 has had less than one.

PHP end-of-life dates for 8.1 to 8.5

The PHP project supports each version in two stages. During active support it fixes bugs and security holes. During security support it fixes security issues only. After that the version is end of life: no more fixes of any kind. These dates come from php.net's supported versions and end-of-life branches pages, checked on 15 October 2026.

PHP versionReleasedActive support untilSecurity fixes untilStatus in October 2026
8.520 Nov 202531 Dec 202731 Dec 2029Active support
8.421 Nov 202431 Dec 202631 Dec 2028Active support (our pick for most sites)
8.323 Nov 202331 Dec 202531 Dec 2027Security fixes only
8.28 Dec 202231 Dec 202431 Dec 2026Security fixes only, ending in about 11 weeks
8.1––31 Dec 2025End of life
8.0––26 Nov 2023End of life
7.4––28 Nov 2022End of life

A version doesn't stop working on its end-of-life date. What stops is the patching: any security hole found in PHP 8.2 after that date stays open. Hosting platforms also start removing old versions. WP Cloud has announced it will remove PHP 8.2 on 15 December 2026, and Acquia ended PHP 8.2 support on 1 October 2026, moving remaining environments to PHP 8.4 automatically.

Plenty of sites are behind. On 15 October 2026, WordPress.org's usage statistics showed PHP 8.3 on 26.4% of WordPress sites and PHP 8.2 on 24.0%. PHP 7.4 was on 16.3%, PHP 8.1 on 10.9%, PHP 8.4 on 9.2%, PHP 8.0 on 3.9% and PHP 8.5 on 3.7%. Put together, about 61% of sites ran PHP 8.2 or older, and about 37% ran a version that no longer gets any security fixes. These figures change every week.

What about PHP 8.6? It is in testing. Release candidate 3 came out on 8 October 2026, and the PHP team's release schedule targets general availability on 19 November 2026, though those dates can move. Don't run a release candidate on a live site, and once 8.6 is out, give your plugins a few months to catch up. HostEthical doesn't offer PHP 8.6 yet.

What WordPress 7 requires and recommends

WordPress 7.0, released on 20 May 2026, raised the minimum PHP version from 7.2.24 to 7.4. WordPress 7.1, released on 19 August 2026, keeps the same minimum. The WordPress Hosting Team's compatibility pages for 7.0 and 7.1 say:

  • Core is fully compatible with PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 and 8.5.
  • PHP 7.4, 8.0 and 8.1 are end of life, so WordPress supports them for backward compatibility only.
  • For a new installation, the Hosting Team recommends PHP 8.4 or 8.5.

WordPress.org's general requirements page is a little more relaxed and recommends PHP 8.3 or greater. So treat 8.3 as the floor and 8.4 or 8.5 as the target.

These statements cover WordPress core only. Themes and plugins come from other authors, and they cause almost every problem you'll hit when you upgrade PHP.

How to check which PHP version your site uses

  • In WordPress: go to Tools → Site Health → Info and open the Server section, where the PHP version is listed. WordPress also shows a "PHP Update Recommended" or "PHP Update Required" notice on the dashboard when your version is out of date.
  • In your HostEthical dashboard: open the website's Manage page. The PHP card shows the version the site is running. The version menu labels 8.1 as "end of life" and 8.2 as "security fixes until Dec 2026", so old versions are hard to miss. It also marks PHP 8.3, the default for new websites, as "recommended". That is a safe choice, but with up-to-date plugins, 8.4 is the better pick.
  • Over SSH: php -v shows the command-line PHP, which isn't always the version your website runs. For the website itself, trust Site Health or the dashboard.

Before you upgrade: update core, themes and plugins

Plugin and theme authors usually fix PHP compatibility problems in their updates, so updating first removes much of the risk before you touch PHP.

  1. Update everything: WordPress core, every plugin and the theme. On HostEthical, the WordPress card on the website's Manage page has an Updates tool that updates everything, or just core, plugins or themes. It backs up your whole account first.
  2. Look for abandoned plugins. On a plugin's WordPress.org page, check "Last updated" and watch for the notice that it hasn't been tested with the latest three major releases of WordPress. For premium plugins, look in the changelog for PHP 8.4 or 8.5 support. A plugin that hasn't been updated in two or three years is the most likely thing to break.
  3. Check unusual PHP extensions. If a plugin needs something like ionCube Loader or PHP's IMAP functions, check with support first that it's available on the version you're moving to. PHP 8.4 moved IMAP out of the standard PHP distribution, according to php.net's migration notes.

WordPress.org's guide to updating PHP still suggests the PHP Compatibility Checker plugin. But its plugin page now says it is no longer maintained, its description only goes as far as PHP 8.0, and it can't scan plugins that aren't hosted on WordPress.org. For 8.4 or 8.5, real testing is the only reliable check.

What changes between PHP versions

From php.net's migration guides, these are the changes most likely to trip up older plugins:

Moving fromWhat changedWhat you'll see
7.4 to any 8.xPHP 8.0 turned a number of warnings into errors and removed old functions such as create_function() and each()Fatal errors: the biggest jump, so test with extra care
8.1 to 8.2Creating dynamic properties on most classes is deprecated"Deprecated" lines in the error log
8.2 or 8.3 to 8.4Implicitly nullable parameter types are deprecated; IMAP, OCI8, PDO_OCI and PSpell left the standard distributionMostly "Deprecated" lines; errors only if a plugin needs a removed extension
8.4 to 8.5Old cast names such as (boolean) and (integer), and null as an array key, are deprecated"Deprecated" lines in the error log

A deprecation is a warning, not a breakage: the code still runs but will stop working in a future PHP version. Fatal errors are what take a site down, which is why a jump from 7.4 needs more care than a move from 8.3 to 8.4.

Pick the PHP version for each website. HostEthical hosting lets you switch between PHP 8.3, 8.4 and 8.5, with staging copies, one-click WordPress updates that back up first, and nightly backups you can restore in one click. See hosting plans →

Test the new PHP version on a staging site first

The safest test is a copy of your site running the new PHP version, where a fatal error costs nothing. If your host lets a staging copy run its own PHP version, switch the copy and click through it before touching the live site.

On HostEthical, open the website's Manage page, go to Staging and click Create staging copy. Your files and database are copied to staging.yourdomain.com, which search engines are told not to index.

The PHP version, though, is set per website, and at the time of writing the staging copy doesn't have its own PHP menu. So use staging for the riskiest groundwork from the previous step: big plugin updates, swapping out an abandoned plugin, or a theme update.

When the copy works, click Publish to live. We back up the whole account before publishing, and your live wp-config.php is never overwritten. But publishing the database replaces the live one. If the site has taken orders, comments or form entries since you made the copy, don't publish the database: repeat the same updates on the live site instead.

Then switch the live site during a short, planned test window, as described below.

Test with this checklist:

  • The home page, a few posts and pages, and your search results.
  • Every form: contact, enquiry, booking and newsletter sign-up. Submit each one.
  • For WooCommerce: add to cart, the cart page and checkout as far as the payment page.
  • Logging in to wp-admin, editing and saving a post, and uploading an image.
  • Your page builder's editor, if you use one.

Switch the live site and watch the error log

  1. Pick a quiet hour, such as late night IST for most Indian sites.
  2. Take a fresh backup. Nightly backups run automatically, but a fresh one means you lose nothing if you have to go back. On HostEthical, go to Backups and click Take a backup.
  3. Change the version. On the website's Manage page, choose the new version in the PHP version menu on the PHP card and click Save PHP settings. Leave "Show PHP errors on the page" switched off: visitors would see the errors too.
  4. Clear caches. Click Clear cache on the Page cache card of the Manage page (shown while the cache is on) and clear any cache plugin. Otherwise you may be looking at pages built under the old version.
  5. Run the checklist from the previous section.
  6. Read the error log. Open Logs on the Manage page and click Load error log. It includes PHP's own errors, which are logged per hosting account, so lines from your other websites can appear too. "PHP Fatal error" lines need fixing now; "PHP Deprecated" lines are warnings about future versions.
Heads up. The websites in one HostEthical hosting account can use at most 2 different PHP versions at the same time. If two sites run 8.2 and a third runs 8.3, moving just one of the 8.2 sites to 8.4 would make three versions, so the dashboard will ask you to move another site first. Move the 8.3 site to 8.4 first, then the two 8.2 sites. One-click Laravel, Joomla and Drupal sites need PHP 8.3 or newer.

If something breaks: rolling back with a backup

A PHP problem usually shows up as a blank page or WordPress's "critical error" screen. Since WordPress 5.2, fatal error recovery mode also emails the site's admin address a link that lets you log in with the faulty plugin or theme paused. On HostEthical that email only arrives if your site has a working mailer plugin using an email service's API, because websites can't send email straight from the server. Our guide to fixing WordPress email explains the setup.

You don't need to wait for the email. Fix it in this order:

  1. Switch the PHP version back in the same menu. Changing the version doesn't touch your files or database, so this usually brings the site straight back.
  2. Find the culprit. The fatal error line in the log names a file, often in wp-content/plugins/plugin-name/. That folder name tells you which plugin to update, replace or report to its author.
  3. If you can't get into wp-admin, deactivate the plugin by renaming its folder in File Manager or over SFTP, or with wp plugin deactivate plugin-name over SSH, run from the website's public_html folder, where WordPress is installed.
  4. Restore a backup only if data was changed while the site was misbehaving, for example by a plugin running a half-finished database update. Go to Backups, find the backup you took before the switch and click Restore. A restore covers every website in the hosting account, so if you run several websites, changes made on the others since that backup are lost too.

Once the plugin is fixed or replaced, try the new version again.

Does a newer PHP version make WordPress faster?

Usually a little. WordPress.org's update guide says newer PHP versions are more efficient and your site may load faster. How much depends on your theme, plugins and traffic.

For a typical small-business site, a page cache, properly sized images and fewer heavy plugins usually make a bigger difference than the PHP version. Our guide to speeding up WordPress covers those fixes. The number of PHP workers on your plan matters too, because it sets how many uncached requests your site can handle at once. See what to look for in WordPress hosting and our hosting checklist.

The real reason to upgrade is security. A site on PHP 8.4 gets security patches until the end of 2028. After 31 December 2026, a site on PHP 8.2 gets none.

If your current host can't give you PHP 8.4, it's time to move. HostEthical hosting starts at ₹99 a month, or about ₹82.50 a month when billed yearly, with the same price at renewal. New websites start on PHP 8.3, and you can move each one to 8.4 or 8.5 from its Manage page.

Move off PHP 8.2 before 31 December. Choose PHP 8.4 or 8.5 for each website, update plugins on a staging copy first and keep nightly backups to fall back on. See hosting plans →

Frequently asked questions

What PHP version does WordPress 7 need?

WordPress 7.0 and 7.1 need at least PHP 7.4. PHP 7.4, 8.0 and 8.1 are end of life, so WordPress supports them for backward compatibility only. WordPress.org recommends PHP 8.3 or newer, and its Hosting Team recommends PHP 8.4 or 8.5 for new installations.

What happens to my site when PHP 8.2 reaches end of life?

Your site keeps working after 31 December 2026, but PHP 8.2 stops getting security fixes, so any new vulnerability stays open. Some hosting platforms are also removing it: WP Cloud plans to drop PHP 8.2 on 15 December 2026. Move to PHP 8.4, or to 8.3 if a plugin isn't ready, before the deadline.

Will upgrading PHP break my WordPress plugins?

Usually not, if WordPress, your theme and your plugins are up to date: core is fully compatible with PHP 8.4 and 8.5, and plugin and theme authors usually fix PHP problems in their updates. Abandoned plugins are the main risk, especially when you're jumping from PHP 7.4. Update everything first, take a backup, switch, check the error log, and switch back if something breaks.

Is PHP 8.5 safe to use with WordPress?

For WordPress core, yes: WordPress 7.0 and 7.1 are fully compatible with PHP 8.5, which gets security fixes until 31 December 2029. Check that your theme and each plugin support 8.5 before switching. For an older site, PHP 8.4 is the safer choice, or 8.3 if a plugin isn't ready yet.