Guide

PHP2Shell and WordPress: how to check and update your PHP version

Updated

Two critical PHP flaws were patched on October 21, 2026. Here is how to check whether your WordPress site is on a fixed version, and how to update PHP safely if it isn't.

On October 21, 2026, the PHP team released fixes for two critical security flaws, CVE-2026-109618 and CVE-2026-109619. Researchers named them PHP2Shell. The NSA told organizations to update right away, and to take affected systems offline if they can't update yet.

WordPress runs on PHP, so this affects almost every WordPress site. The good news is that the fix is a PHP update, usually a few clicks in your hosting panel or one message to your host. This guide shows you how to check where you stand and how to update safely.

What PHP2Shell is

PHP2Shell is a pair of flaws in PHP itself, the language WordPress and most of the web run on. A specially built request can let an attacker run their own code on your server, without a password. Both are rated critical (9.2 out of 10).

  • Default PHP setups are affected, on both common server setups (PHP-FPM and Apache's mod_php).
  • Researchers showed the attack working against WordPress without logging in.
  • Attacks were reported the same day the fix came out, and attack tools are public.

Because the flaw is in PHP, updating WordPress, your theme or your plugins doesn't fix it. Neither does a security plugin or WordPress maintenance mode: PHP handles the request before WordPress even starts. The fix has to be made on the server.

Which PHP versions are fixed

Your site is on a fixed version if it runs one of these, or anything newer in the same line:

  • PHP 8.5.12
  • PHP 8.4.27
  • PHP 8.3.36
  • PHP 8.2.35

The last number matters. "PHP 8.3" in your hosting panel only tells you the line; 8.3.30 is still vulnerable, 8.3.36 is fixed.

PHP 8.1 and older will not get an official fix. PHP 8.1 reached end of life at the end of 2025, and PHP 7 years before that. Some hosts and Linux distributions patch their own builds of older versions, but you can't tell from the version number. If your site is on 8.1 or older, plan to move it to 8.3 or 8.4.

Step 1: Check your PHP version

In WordPress (easiest):

  1. Log in to wp-admin and go to Tools, then Site Health.
  2. Click the Info tab and open the Server section.
  3. Read the line "PHP version". It shows the full number, such as 8.3.36.

If your dashboard shows a "PHP Update Required" notice, WordPress has already spotted that your PHP is out of date. Treat it as urgent this week.

In your hosting panel: look for "PHP version", "Select PHP Version", "MultiPHP Manager" or "PHP Manager". Panels often show only the line (8.3), so confirm the full number in Site Health afterwards.

From the command line: php -v shows the version of the command-line PHP, which can differ from the one serving your website. Site Health is the more reliable check.

Step 2: Take a backup first

Before you change anything, make sure a fresh backup exists. Use your host's backup tool (most panels have one) or a backup plugin, and check the backup finished and that you know how to restore it. A PHP change rarely breaks a site, but when it does, a backup turns a bad day into a five-minute rollback.

Step 3: Update PHP

How you do this depends on your host. Pick the newest version your host offers, ideally 8.3 or 8.4.

cPanel hosts:

  1. Log in to cPanel and open "MultiPHP Manager" (or "Select PHP Version" on some hosts).
  2. Tick your domain, choose the new PHP version from the menu, and click Apply.
  3. If you use "Select PHP Version", keep the extensions list as it was unless your host says otherwise.

Other shared hosts (SiteGround, Hostinger, Bluehost, GoDaddy and others) have the same setting in their own dashboard, usually under the website's settings or an "Advanced" or "Devs" menu, named "PHP version" or "PHP Manager".

Managed WordPress hosts (WP Engine, Kinsta, Flywheel and similar) patch PHP for you. Some let you choose the PHP line in their dashboard; either way, ask support to confirm the patched build (see Step 5).

A VPS or your own server: update PHP through your package manager or your server panel, then restart PHP-FPM or Apache. Updating the package without a restart leaves the old, vulnerable code running.

Step 4: Test the site

Right after the change, open the site in a private browser window and check:

  • The home page and a few inner pages
  • Your contact or quote form (send a test)
  • Checkout or bookings, if you have them
  • The wp-admin login

Then check Site Health again and confirm the full version number is a fixed one. If something breaks, switch back to the previous version straight away and note what broke. Our guide to the WordPress critical error explains how to find which plugin or theme can't handle the newer PHP.

Step 5: When your host has to do it

If you can't choose the version yourself, or the panel doesn't show the full number, send your host a short message:

Hi, please confirm that the PHP serving my site (yourdomain.com) is patched for CVE-2026-109618 and CVE-2026-109619 (PHP2Shell), meaning PHP 8.3.36, 8.4.27 or newer, or a backported fix. If it isn't patched yet, please tell me when it will be and what you are doing to protect the server until then. Thank you.

Until a fix is in place, server-level measures such as blocking file-upload requests can reduce the risk, but they can also break forms and uploads, and only your host can apply them. Turning off PHP's upload progress setting on its own is not enough.

When to hand it over

Get help if your site is on PHP 7 or 8.1 and old plugins or a custom theme may not survive the jump, if the site runs a store or bookings you can't afford to break, if you don't have hosting access, or if you notice signs of a break-in: admin users you don't recognize, strange files, or redirects. Our guide on a hacked WordPress site covers that case.

Our emergency WordPress repair covers the whole PHP update for a flat $599. We back up the site, move it to a patched PHP version, test your pages, forms and checkout, and fix whatever newer PHP breaks. Most are done by the next morning.

Rather we handle the update? Flat $599, 30 days of the Care plan included. No fix, no charge.

Start my fix

Questions we get asked

What is PHP2Shell?

PHP2Shell is the name researchers gave to two critical flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619. They can let an attacker run code on a server without logging in. They were patched on October 21, 2026.

Is my WordPress site affected?

If your server runs PHP and hasn't been updated to a fixed build, very likely yes. The flaws are in PHP, not in WordPress, so plugins and WordPress updates don't fix them. Researchers showed the attack working against WordPress.

Which PHP versions are fixed?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, or anything newer in those lines. PHP 8.1 and older don't get an official fix, although some hosts and Linux distributions patch their own builds.

Does WordPress maintenance mode protect me?

No. PHP processes the request before WordPress checks for maintenance mode, so the site is exposed either way. The fix has to happen on the server.

Will updating PHP break my site?

A small version step, such as 8.3.30 to 8.3.36, is very unlikely to. A jump between lines, such as 7.4 or 8.1 to 8.3, can break old plugins or themes. Take a backup first and test the site right after the change.

Can you update PHP for me?

Yes. We back up the site, move it to a patched PHP version, test the pages, forms and checkout, and fix anything that breaks. It's our flat $599 emergency fix, most done by the next morning, and if we can't fix it you don't pay.