The php2shell vulnerability: how to check and fix your PHP site
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.
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.
Here's how to update PHP version in WordPress, in short: check which version you're on in Tools > Site Health, back up the site and update everything, then change the PHP version in your hosting panel, not inside WordPress. Then test your key pages. The switch itself takes minutes. The checks before and after are what keep your site safe.
PHP is the programming language WordPress runs on. Your host runs it on the server, and each version stops getting security fixes on a fixed date. WordPress.org recommends PHP 8.3 or higher, so if your site is on anything older, it's time to plan the move.
You can check your PHP version in 2 places:
If the 2 don't match, trust Site Health, because it reports the version actually running your site. If you have more than one site, check each one. Some panels set PHP per domain, others for the whole hosting plan.
Two official pages answer this. For the WordPress PHP requirements, WordPress.org's requirements page recommends "PHP version 8.3 or greater." It says WordPress also works with PHP 7.4 and up, but warns that older versions have reached end of life and "may expose your site to security vulnerabilities." For the supported PHP versions, php.net's supported versions page shows how long each one gets fixes:
Anything older than 8.2 is already past end of life. WordPress itself is ready for the newer versions: the core team's PHP compatibility table lists WordPress 7.1 as supported on PHP 8.3, 8.4 and 8.5. The real question is your plugins and theme.
A practical rule: if your plugins are all current, choose 8.4. It meets WordPress.org's recommendation and gets security fixes until the end of 2028. If you rely on an older plugin you can't replace yet, 8.3 is the minimum worth moving to. Skip PHP 8.6 for now. It's still a release candidate, and php.net's RC4 announcement says not to use it in production.
Send your website and we will record a free 2 minute video showing the 3 fixes we would make first.
Plugin pages are easy to misread. Each plugin's WordPress.org page shows a "PHP version" line, such as "8.3 or higher", and a "Tested up to" line. According to WordPress's plugin readme guide, the "Requires PHP" value behind that line is the minimum PHP version the plugin needs, and "Tested up to" is the WordPress version it was tested against, not a PHP version. Neither proves the plugin works on a newer PHP. A recent "Last updated" date is a better sign, and a plugin untouched for 2 years deserves a staging test or a question to its developer.
WordPress has no PHP setting of its own. You change it in your hosting panel. Here's where to find it at common hosts, checked against each host's help pages in October 2026.
| Host or panel | Where the PHP setting is | Applies to |
|---|---|---|
| cPanel (many hosts) | Software > MultiPHP Manager | The domains you tick |
| Hostinger hPanel | Websites > Dashboard > PHP Configuration | All websites on the plan |
| Plesk | Websites & Domains > your domain > PHP | That domain |
| SiteGround | Site Tools > Devs > PHP Manager | That site |
| Bluehost | Websites > Manage Site > Advanced > PHP Version | That website |
According to cPanel's documentation, you open MultiPHP Manager, tick the checkbox next to your domain, choose a version from the PHP Version menu and click Apply. Choosing "inherit" makes the domain follow the server's default version, so pick a specific version if you want to control it. If the version you want isn't listed, it isn't installed or isn't available to your account, and your host has to add it. Hosts can also switch this tool off, so if you don't see MultiPHP Manager, look for another PHP option in your panel or ask support.
Hostinger's help center gives these steps: go to Websites, click Dashboard next to the site, open PHP Configuration from the sidebar, select the version and click Update. The change takes effect within a couple of minutes and applies to all websites on the hosting plan. You can pick 8.2 to 8.5, and Hostinger applies patch releases automatically. One catch: Hostinger says existing websites can't downgrade, except within the same login session if an issue occurs. Test right after switching, before you log out.
In Plesk's documentation, the steps are: go to Websites & Domains, find your domain and click PHP, choose the version from the PHP version menu, then click OK. If the version you need is missing from the menu, Plesk says to contact your hosting provider.
In Site Tools, go to Devs > PHP Manager, click the pencil icon to change the PHP version, make your choice and click Confirm, according to SiteGround's knowledge base. SiteGround also offers Managed PHP, where it periodically moves sites to a newer default version. If you set a version manually, SiteGround says it will not update it for you, so put a reminder in your calendar.
Bluehost's help article describes this path: in the Bluehost Portal, open Websites, click Manage Site, open the Advanced tab, click Change Version in the PHP Version tile, pick a version and click Apply. Shared hosting accounts can also use MultiPHP Manager in cPanel. Bluehost marks versions below 8.2 as deprecated.
Other hosts usually have a similar setting called PHP Version, PHP Settings or PHP Configuration. If you can't find it, ask support to switch it for you.
Do this straight away, while switching back is still easy:
If you see "There has been a critical error on this website", stay calm. Your content is safe in the database. Switch PHP back to the version you wrote down, as long as it's still supported and patched, then find the plugin that failed. Our step-by-step guide to the WordPress critical error after a PHP update walks through the recovery email, error logs and fixes.
Two dates make this more than routine maintenance:
Check your version in Site Health today. If it's below 8.3, or not one of the patched October 2026 builds, set aside a quiet hour this week for the backup, updates and switch.
If you'd rather hand it off, we build and look after WordPress and Laravel sites, including PHP updates and testing. Or send us your site and we'll record a free 2 minute video audit showing the 3 fixes we'd make first.
No. PHP runs on your hosting server, so your host controls it, not WordPress. Some hosts handle part of it for you: Hostinger applies patch releases automatically, and SiteGround's Managed PHP periodically moves sites to a newer default version. Moving to a new main version, such as 8.3 to 8.4, is usually something you or your developer choose in the hosting panel.
WordPress.org recommends PHP 8.3 or higher. For most sites with up-to-date plugins, PHP 8.4 is a sensible choice, since php.net lists security fixes for it until December 31, 2028. Whichever version you pick, make sure it's a patched build: 8.3.36, 8.4.27, 8.5.12 or later. Avoid PHP 8.6 until it's officially released and your plugins support it.
Usually not, if WordPress, your theme and your plugins are up to date. Problems come from plugins, themes or custom code that haven't been updated for newer PHP. That's why you back up, update everything and test on staging first where you can. If something does break, you can switch PHP back in the hosting panel while you fix the plugin that failed.
Usually, yes, in the same panel where you changed it. Some hosts limit this. Hostinger, for example, says existing websites can't downgrade except within the same login session if an issue occurs. Only go back to a supported, patched version, never PHP 8.1 or older, and treat it as a short pause while you fix whatever broke.
The switch itself is quick. Hostinger, for example, says the change takes effect within a couple of minutes. The work around it takes longer: the backup, the plugin and theme updates, and testing your forms, phone links and checkout afterward. Sites with many plugins or a custom theme deserve a staging test first, so set aside a quiet hour or two.
The 3 fixes we'd make first on your site, within 1 business day.