How to update PHP version in WordPress without breaking your site
You change PHP in your hosting panel, not in WordPress. Here's how to check your version, pick the right one, switch it at 5 common hosts and test without surprises.
Two critical PHP flaws fixed on October 21, 2026 are now on CISA's exploited list. Here's how to check your site, get it patched and look for signs of a break-in.
The php2shell vulnerability is the nickname for 2 critical flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619. PHP is the programming language behind WordPress, WooCommerce, Laravel and many other platforms, and these bugs can let a stranger run code on your web server without logging in. PHP fixed both on October 21, 2026. On October 26, the US Cybersecurity and Infrastructure Security Agency (CISA) added them to its list of vulnerabilities exploited in real attacks.
The fix is a PHP update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or a patched build from your host. On shared and managed hosting, your host usually does this, so your job is to confirm it in writing. On a VPS, someone has to install the update and restart PHP. Sites on PHP 8.1 or older got no official release and need a version upgrade.
Both flaws sit in how PHP handles memory during web requests, not in any plugin or theme. The PHP security advisory describes them like this:
PHP rates both 9.2 out of 10 (CVSS v4.0) and says they can allow unauthenticated remote code execution. In plain words, a stranger could make your server run their code. PHP considers the risk highest for Apache with mod_php, where it has a demonstrated attack that triggers "before any application code runs." That's why updating WordPress or your plugins doesn't fix it.
session.upload_progress.enabled=0 until the next bugfix release, for a related flaw (CVE-2026-115560) that needs an unusual configuration.Probably, if your website runs on PHP and hasn't been patched since October 21. W3Techs reports that PHP runs 69.2% of websites whose server-side language it can detect, as of October 27, 2026. CISA says the flaws affect all PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. That covers WordPress, WooCommerce, Laravel, Magento, Joomla and custom PHP sites, plus staging copies and forgotten subdomains on the same account.
Who does the work depends on your hosting:
| Hosting type | Who updates PHP | Your job |
|---|---|---|
| Shared hosting (cPanel, hPanel, Plesk) | Your host | Get written confirmation |
| Managed WordPress hosting | Your host | Get written confirmation |
| VPS, cloud or dedicated server | You or your developer | Update packages, restart PHP |
| PHP 8.1 or older | Only hosts that backport fixes | Ask, then upgrade the version |
Hostinger's php2shell update shows the split: every plan except VPS needs nothing from the customer, while VPS owners must update PHP and restart it.
Send your website and we will record a free 2 minute video showing the 3 fixes we would make first.
Write down the full number, like 8.3.36, not just 8.3.
Log in to cPanel and open MultiPHP Manager in the Software section. cPanel's documentation says the list shows each domain with the PHP version it uses, and an "Inherited" label if it uses the server default. If you only see the branch, such as PHP 8.3, get the exact number from WordPress Site Health or your host.
Go to Websites, click Dashboard next to your site, then find PHP Info in the sidebar. The version is at the top. Hostinger's help page adds a useful check: a Build Date of October 21, 2026 or later means the fix is in place, even if the version number didn't change.
Open Websites & Domains. Plesk's documentation says the selected PHP version appears next to the PHP icon on the domain card. Click PHP, then View the phpinfo() page.
In your WordPress dashboard, go to Tools, then Site Health, then the Info tab, and expand Server, as described in WordPress's Site Health guide. This shows the PHP version that actually serves your pages.
One catch: a lower number doesn't always mean you're exposed. Some hosts and Linux distributions add the fix to the version they already run. CloudLinux notes that a patched build can still report an older number such as 8.4.26. Your host's written answer matters more than the number on screen.
Updating PHP is the only complete fix. PHP's release notes for all 4 versions say "updating is the only safe choice."
| Your PHP branch | Fixed release (Oct 21, 2026) | Security fixes until |
|---|---|---|
| 8.5 | 8.5.12 | Dec 31, 2029 |
| 8.4 | 8.4.27 | Dec 31, 2028 |
| 8.3 | 8.3.36 | Dec 31, 2027 |
| 8.2 | 8.2.35 | Dec 31, 2026 |
| 8.1 and older | No PHP release | Already end of life |
Support dates come from php.net's supported versions page.
Your host may well have patched already. php.net says Linux distributions and long-term support vendors received the patches in advance. Don't assume, though. Open a support ticket and ask for written answers to 4 questions:
Install the updated PHP packages from your Linux distribution, panel vendor or PHP repository, then restart PHP-FPM, Apache or LiteSpeed. Tenable's php2shell FAQ explains why: "Installing updated PHP packages does not patch PHP processes that are already running." CloudLinux and Hostinger give the same instruction.
php.net says 8.1 and older "no longer receive updates from the PHP project." It published only minimal source patches for 7.4, 8.0 and 8.1, and some vendors offer backported packages. CISA's advice is to take systems on PHP 8.1 or earlier offline until they are patched or updated. The real fix is moving to a supported version. Our guide on how to update the PHP version in WordPress walks through it, and if you're on 8.2, read what PHP 8.2 end of life means before you pick a version.
php -v. On backported builds, look for both CVE IDs in the package changelog. Restart every PHP worker after updating. Until the next bugfix release, php.net recommends session.upload_progress.enabled=0 in php.ini or the FPM pool, not ini_set() or .user.ini. If PHP-FPM children crash on 8.4.27 or 8.5.12, the WordPress hosting handbook describes a SimpleXML regression and says not to downgrade.If a server truly can't be updated today, the PHP advisory lists settings that "reduce exposure to specific attack paths but do not make an installation safe":
memory_limit=-1, set where applications can't override it, plus a container or cgroup memory limitpost_max_size (8M without file uploads, 32M with them) and request size limits at the web server or proxysession.upload_progress.enabled=0, then a restart of every workerfatal_error_backtraces=0, then a restart of every workerWhy they fall short:
Patching closes the door, but it doesn't remove anyone who got in first. CISA's catalog entries ask federal agencies to complete forensic triage, not just patch. For your site, run a short check:
If you find something, don't just delete the file. Make sure PHP is patched, then restore a clean backup from before the problem started, with your host's help if needed. Then change every password: WordPress admins, hosting, FTP or SFTP and the database. WordPress.org also recommends new secret keys in wp-config.php, which logs everyone out.
Today, check your PHP version and get your host's written confirmation. This week, run a malware scan and review your admin users. If you're on 8.2 or older, plan the move to a newer branch before December 31.
If you don't have a developer, we build and maintain WordPress and Laravel sites and can handle the check and the update. Or send us your site for a free 2 minute video audit showing the 3 fixes we'd make first.
php2shell is the nickname for CVE-2026-109618 and CVE-2026-109619, 2 critical flaws in PHP fixed on October 21, 2026. Both are rated 9.2 out of 10 and can let an attacker run code on a web server without logging in. The fixed releases are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
If it runs on PHP that hasn't been patched since October 21, 2026, yes. The flaws are in PHP, not WordPress, so every PHP site is affected the same way. Check your PHP version in Site Health under the Info tab, then ask your host to confirm in writing that your PHP build includes both fixes.
Not necessarily. Some hosts and Linux distributions add the fix to the version they already run, so the number doesn't change. Hostinger says a PHP build date of October 21, 2026 or later means the fix is in place. To be sure, ask your host which build serves your site and whether it includes both fixes.
Only partly. PHP says that in the highest-risk setup, the attack can trigger before any application code runs, and a WordPress security plugin is application code. Server firewalls can block known attack patterns, and CISA says they may give some protection until you patch. Updating PHP is the only complete fix.
No. Plugin updates don't fix it, because the flaws are in PHP itself. Keep plugins updated anyway, since they get their own security fixes. The php2shell fix comes from updating PHP to a fixed release or a patched build. If you're on PHP 8.1 or older, you'll also need to move to a supported PHP version.
The 3 fixes we'd make first on your site, within 1 business day.