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

The short answer
PHP2Shell is a flaw in PHP, the software your web host runs underneath WordPress, so updating WordPress, your theme or your plugins does not fix it. Your site is covered once the server runs PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35 or later, or a build your host has patched, and the only way to be sure of the second case is to ask your host in writing.
Most owners need four steps, in this order:
- Know what PHP2Shell is. Two bugs in PHP itself, fixed on October 21, 2026.
- Check your PHP version. WordPress shows it under Tools, then Site Health.
- Confirm the fix with your host. A version number alone does not prove the patch is in.
- Update PHP if you are on 8.1 or older. Those versions get no official fix.
Then two things that save you a second scare: PHP2Shell is not the same as wp2shell, and PHP is one of three layers on a WordPress site that each need their own updates.
What PHP2Shell is, in plain English
WordPress is written in PHP, and PHP is installed on your host's server, not inside your WordPress dashboard. On October 21, 2026, the PHP project released fixed versions for two critical bugs, CVE-2026-109618 and CVE-2026-109619, each rated 9.2 out of 10 (PHP security advisory). Researchers named the pair PHP2Shell.
In short, a specially built web request can make PHP run out of memory while it is setting the request up, and PHP's cleanup then trusts data that was only half built. An attacker who gets that right can run their own code on the server, without logging in (Huntress). Because the flaw sits below WordPress, a site with perfectly kept plugins is still exposed: Wiz showed it working against the standard WordPress, Drupal and Joomla containers (Wiz).
It is not theoretical. On October 26, CISA, the US government's cybersecurity office, added both bugs to its list of vulnerabilities attackers are actively using (CISA). The good news is that the fix is a normal PHP update, and some hosts, Kinsta among them, applied it within a day.
Check your PHP version
You can see which PHP your site runs without any plugin:
- Log in to WordPress as an administrator.
- Go to Tools, then Site Health, then the Info tab.
- Open the Server section and read the line PHP version.
Compare it with this table, built from the PHP security advisory:
Your PHP version | Fixed in | What it means |
|---|---|---|
8.5.x | 8.5.12 | Fixed at 8.5.12 or later |
8.4.x | 8.4.27 | Fixed at 8.4.27 or later |
8.3.x | 8.3.36 | Fixed at 8.3.36 or later |
8.2.x | 8.2.35 | Fixed at 8.2.35 or later; PHP 8.2 support ends December 31, 2026 |
8.1, 8.0, 7.4 | No official release | Only a host or Linux vendor can patch it; plan an upgrade |
7.3 or older | No fix | Upgrade PHP |
If Site Health shows only "8.3" or a number below the fixed release, do not assume the worst yet. Hosts often patch PHP without changing the number you see, which is the next step.
Confirm the fix with your host
Kinsta, a managed WordPress host, patched PHP across its platform and marked the incident resolved on October 22, but it also warns that the PHP version shown in its dashboard "doesn't confirm whether a security patch is applied" (Kinsta). That is true of most hosts, because they often backport a fix into the version you already run. So the reliable check is a written answer from your host.
Send this from your hosting account's support form or email:
Hello, my site is [your domain]. Has the PHP running it been patched for PHP2Shell (CVE-2026-109618 and CVE-2026-109619)? If not, when will it be, and do I need to change anything on my plan? Thank you.
Keep the reply. If the answer is yes, you are done with PHP2Shell. If the host cannot patch your plan or your PHP version, the next step applies. If the host offers interim settings in the meantime, take them, but know that the PHP project says "updating is the only safe choice" (PHP security advisory).
Update PHP if you are on 8.1 or older
PHP 8.1 and older get no official PHP2Shell release, and they are common: Modat counted about 79% of the PHP services it could read a version from running a branch PHP no longer supports (Notebookcheck, citing Modat). WordPress itself recommends PHP 8.3 or greater (WordPress requirements).
WordPress's own guide to updating PHP (WordPress.org) gives the safe order:
- Back up the site first, files and database, and know how to restore it.
- Update WordPress, the theme and every plugin, then check the site still works.
- Check compatibility. The PHP Compatibility Checker plugin flags code that may break; it is not perfect, so treat it as a first look.
- Change the PHP version in your hosting panel, usually a menu called PHP version or PHP settings, or ask the host to do it. Pick 8.3 or 8.4 rather than 8.2, so you are not doing this again in two months.
- Test the pages that matter. The home page, a contact form, any checkout or booking page, and the admin login.
- If something breaks, switch the PHP version back and contact the plugin's developer. Your backup covers the worst case.
A plugin that stops working on a current PHP version is a plugin nobody is maintaining, which is worth knowing whatever happens with PHP2Shell.
PHP2Shell is not the same as wp2shell
Two bugs with nearly the same name hit WordPress sites four months apart, and they need different fixes:
PHP2Shell | wp2shell | |
|---|---|---|
Where the flaw is | PHP, on the server | WordPress core, its REST API |
When | October 2026 | July 2026 |
The fix | A PHP update, by your host or you | WordPress 7.0.2, 6.9.5 or 6.8.6 |
Applied automatically? | Only if your host does it | Yes, WordPress pushed it as an automatic security update |
wp2shell (CVE-2026-63030 and CVE-2026-60137) was a WordPress flaw that attackers used to install hidden files and rogue admin accounts (BleepingComputer). If your WordPress is on one of those fixed releases or newer, that one is handled. It tells you nothing about PHP2Shell, and the reverse is also true.
Why this keeps coming back
A WordPress site has three layers that each need their own updates, and each has a different owner:
- PHP, updated by your host, or by you on a server you manage.
- WordPress core, updated automatically for security releases, by you for the rest.
- The theme and plugins, updated by you, one by one. Patchstack counted 11,334 new WordPress vulnerabilities in 2025, 91% of them in plugins (Patchstack, State of WordPress Security 2026).
PHP2Shell was the bottom layer's turn. The habit that covers all three is a monthly check: the PHP version against the table above, WordPress and plugin updates, and a test of every form. Our guide to WordPress care plans covers what paying someone for that work buys, and what it doesn't. When a form is the thing that breaks, this fix for a contact form that stopped sending email walks through it.
When moving is the better fix
If your site is mostly pages and posts, another way out of the three-layer routine is a site built on fewer layers. EmDash, the open-source CMS from Cloudflare that its makers call "the spiritual successor to WordPress" (emdashcms.com), is built on Astro and runs on Cloudflare Workers or Node.js (EmDash docs). There is no PHP interpreter in it, so PHP2Shell had nothing to attack on an EmDash site. That is a fact about the software, not a promise that a site can't be broken into: EmDash has its own code to update, and its registry plugins are sandboxed and permission-gated rather than risk-free.
Stay on WordPress if your host already confirmed the patch and you rely on plugins with no equivalent elsewhere, such as a large online store, a membership site, or a booking system tied into other tools. For those sites, the monthly check above is the right answer.
Bring your WordPress site into the AI era on EmDash and Astro. We check every URL, redirect, form and search detail against your live site before anything changes, and switch only after you approve the preview, with the rollback written down. After launch we host the site and email you a monthly certificate listing the checks we ran and what changed. A free, read-only check of your public pages shows whether your site is a good fit and the exact price before you ask.
Want to know where your site stands? Check your site for free.
Frequently asked questions
Is my WordPress site affected by PHP2Shell?
It is if the server runs a PHP version below 8.5.12, 8.4.27, 8.3.36 or 8.2.35 that your host has not patched. Check the version under Tools, then Site Health, then Info, then Server, and ask your host in writing whether PHP2Shell is fixed on your plan.
Does updating WordPress fix PHP2Shell?
No. PHP2Shell is a flaw in PHP, which your host installs on the server. Updating WordPress, the theme or plugins does not change the PHP version. The fix is a PHP update, applied by your host or by you in the hosting panel.
How do I find the PHP version in WordPress?
Log in as an administrator, open Tools, then Site Health, and choose the Info tab. The Server section lists the PHP version. Your hosting panel usually shows it as well, under a menu called PHP version or PHP settings.
Should I update PHP on WordPress?
Yes, if you are on PHP 8.1 or older, or below the fixed release for your branch. Back up first, update WordPress and plugins, check compatibility, then change the version in your hosting panel and test your key pages. WordPress recommends PHP 8.3 or greater.
Is PHP2Shell the same as wp2shell?
No. wp2shell was a WordPress core flaw from July 2026, fixed in WordPress 7.0.2, 6.9.5 and 6.8.6 and pushed as an automatic update. PHP2Shell is a flaw in PHP from October 2026, fixed by updating PHP on the server.
Do EmDash sites need the PHP2Shell update?
No. EmDash is built on Astro and runs on Cloudflare Workers or Node.js, with no PHP interpreter, so PHP2Shell does not apply. EmDash still has its own updates, and a site on it still needs routine care.