PHP released a critical security update today, October 21, 2026. PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two flaws that can let an attacker run code on your server without logging in (php.net security advisory). PHP rates both flaws 9.2 out of 10 (PHP's advisory on GitHub).
Researchers call the flaws PHP2Shell. Wiz Research says it ran code without logging in on Drupal's latest container image (Wiz Research).
Attack attempts have started. Cloudflare says it saw attack traffic aimed at its customers (Cloudflare).
The PHP Foundation says the CVE numbers leaked on October 20, but "no technical details leaked." PHP then moved the release up a day, from October 22 to October 21. A security firm's demo video also spread online, and the Foundation says it sped up work on attack code (PHP Foundation).
The Drupal Security Team put out a public service announcement about it. Site owners should "ensure their PHP version is updated as soon as the release is available" (Drupal PSA-2026-10-20).
If your site runs PHP 8.1 or lower, your fix comes from your host. php.net's official releases cover only PHP 8.2 and newer. For older versions, php.net says "the PHP security team provided minimal source-backports for PHP 7.4, PHP 8.0, and PHP 8.1 to help people building from source or without access to an LTS vendor" (php.net security advisory).
Ubuntu and cPanel have already put that fix into their own PHP 8.1 builds, and cPanel did the same for 7.4 and 8.0. Ask your host whether your PHP has it.
php.net stopped regular fixes for 8.1 on December 31, 2025 (PHP end-of-life branches). So plan your move to a supported version. For most Drupal 10 and 11 sites, that means PHP 8.3 or 8.4.
Two more dates come before the end of the year:
- December 9, 2026: Drupal 10 reaches end of life (Drupal release schedule).
- December 31, 2026: PHP 8.2 gets its last security fix (PHP supported versions).
PHP is the programming language Drupal runs on. Your host installs it, and most owners never look at it. That works right up until the host changes it, or stops patching it.
This guide covers what to do today, how to check your version, how each host handles the switch, and who to call.
Key Takeaways
- PHP released 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on October 21, 2026. Sites on PHP 8.1 or lower need a backported fix from their host now, and a supported version soon.
- PHP 8.2 gets its last security fix on December 31, 2026.
- A Drupal 10 site should be on PHP 8.3 or 8.4 now. A Drupal 11 site should be on 8.4.
- Drupal 7 core from drupal.org tops out at PHP 8.3, which stops getting fixes on December 31, 2027.
- Your host may switch PHP for you, charge you to stay behind, or do nothing. Find out which one.
- Check the code on a copy of the site before you switch the live site.
What to do about today's critical PHP security update
The Drupal Security Team's announcement also says plainly that "site owners are responsible for maintaining the security of their hosting platform" (Drupal PSA-2026-10-20).
PHP sits under every Drupal site, whatever the Drupal version. Check your PHP version today, even if Drupal itself is fully up to date.
php.net says "all PHP users are strongly encouraged to update immediately." It also says "there are no complete mitigations, updating is the only safe choice" (php.net security advisory).
What to do today, in order:
- Find your PHP version. Read the PHP version card at
/admin/reports/status. The next section shows where to look and the one trap to avoid. - On PHP 8.2, 8.3, 8.4 or 8.5, get the fixed version. These are the versions php.net still supports.
- Make sure your site runs PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or newer.
- If your host uses PHP from Ubuntu or another Linux distribution, the version number may not change. Ubuntu 24.04's fixed PHP still reports 8.3.6 (Ubuntu). Ask your host whether its package includes CVE-2026-109618 and CVE-2026-109619.
- Ask your host when they're installing it.
- Check your status report tomorrow.
- If the PHP version hasn't changed, open a ticket with your host.
- On PHP 8.1 or lower, get the backported fix, then plan your move. php.net's official releases skip these versions, but backported fixes exist.
- Ask your host whether its PHP build includes the fix for CVE-2026-109618 and CVE-2026-109619. The version number won't change, so the status report can't tell you.
- If your host has no backported fix, move to a supported version now.
- Pick the new version. For most Drupal 10 and 11 sites, that's PHP 8.3 or 8.4.
- On Drupal 7, check core first. Drupal 7 sites need core 7.103 to run PHP 8.3.
- Test the switch on a copy first, using the steps further down.
- Know the CVE numbers. The two flaws are CVE-2026-109618 and CVE-2026-109619. Use them when you ask your host about the fix.
What to expect from your host.
- Linux distributions and long-term support vendors got the patches early. Many hosts can install the fix today.
- php.net also posted minimal source backports for PHP 7.4, 8.0 and 8.1. Hosts and distributions that build their own PHP can use them.
- Some Linux distributions fixed older PHP too. Ubuntu 22.04's PHP 8.1 has the fix (Ubuntu). That buys time, but plan the move anyway.
- cPanel did the same for its own PHP builds. On October 20, 2026, it copied the fix into its PHP 7.4, 8.0 and 8.1 packages. The package notes say "Backport fix for CVE-2026-109618 and CVE-2026-109619" (cPanel's ea-php74, ea-php80 and ea-php81 packages).
- This covers the PHP you pick in cPanel's MultiPHP Manager. A host's "Select PHP Version" tool may use different builds.
- The version number stays the same, such as 8.1.34, so the status report won't show the fix.
- Ask your host whether it has installed the October 20 cPanel PHP update.
- It buys time on a cPanel host, but php.net still doesn't support these versions, so plan the move anyway.
- php.net says the risk is highest on Apache with mod_php. PHP-FPM is affected too. The PHP Foundation says code execution "was also confirmed on PHP-FPM through application-level code paths" (PHP Foundation). Update either way.
- If you run your own server with PHP from rpms.remirepo.net, php.net says that repo "will not have updates today." Switch to your distribution's packages or build from source.
- If your host can't update today, php.net lists settings that lower the risk. They don't make the site safe, so the update still has to happen.
Ask your host in writing whether your PHP version is covered.
If your site uses Cloudflare, you have some cover while you update. Cloudflare's firewall (its WAF) has blocked these attacks since 3:02 a.m. UTC on October 21 (Cloudflare).
- On the Free plan, the protection is on by default. You don't need to do anything.
- On Pro, Business or Enterprise, the rules are in the Cloudflare Managed Ruleset. Check that it's deployed in block mode.
- Check that your site's DNS record is set to "Proxied" (the orange cloud). A "DNS only" record sends visitors straight to your server, so Cloudflare can't filter them (Cloudflare docs).
- Still update PHP. Cloudflare says customers "should patch their PHP repos even with WAF protections." The firewall buys time, and the PHP update is the fix.
A PHP security week works a lot like a Drupal one. My survival guide for the October 14 Drupal security update walks through how to handle the week. When Drupal publishes dozens of advisories in one day, start by finding the Drupal security updates your site needs.
Find the PHP version your site actually runs
Don't guess, and don't trust an old email from your host. Look it up in two places.
1. Drupal's status report. Go to /admin/reports/status (Reports > Status report). The PHP version card shows the version that serves your website.

On this test site, Drupal 10.6.19 runs PHP 8.3.21. Drupal adds its own nudge under the version: "It is recommended to upgrade to PHP version 8.4 or higher for the best ongoing support."
When PHP is past its end date, the card turns into a warning or an error that starts with "Your PHP installation is too old."
Drupal raises its minimum on its own each time a PHP version reaches end of life (Drupal core source). So a site that was fine last year can show an error today without anything changing on your end.
2. Your host's control panel. The PHP setting there shows what the host has set. It should match the status report. If it doesn't, ask your host why.
The command line can run a different PHP
If you or your developer log in over SSH and type php -v, you may get a different answer. On cPanel hosts, the website and the command line often run different PHP versions.
On one client site I checked, the website ran PHP 8.2, while php -v over SSH said 8.3.35. Somebody had set the developer's local copy to 8.3 to "match live." Code tested on 8.3 can use features that crash on 8.2.
Drush and Composer use the command-line PHP. Trust the status report for the website.
To check or force the command-line version:
- To see which PHP Drush is using, run
drush status --fields=php-bin,php-version. - On cPanel, run
php -vfrom inside your docroot, because cPanel picks the command-line version by folder. - To force a version yourself on cPanel, run that version's command-line binary, for example
/usr/local/bin/ea-php83 vendor/bin/drush.php status. Use/usr/local/bin, because/usr/bin/ea-php83is the CGI version of PHP (cPanel's ea-php83 package).
If you can't get them to match, ask your host.
Every PHP version, its end date, and the Drupal versions that run on it
Your site lives on two clocks: PHP's and Drupal's. Most guides show only the Drupal one. Here they are together.
| PHP | Security fixes end | Drupal 7 | Drupal 10 (10.4–10.6) | Drupal 11 (11.1–11.4) | Drupal 12 |
|---|---|---|---|---|---|
| 7.4 | Ended Nov 28, 2022 | Yes | No | No | No |
| 8.0 | Ended Nov 26, 2023 | Yes | No | No | No |
| 8.1 | Ended Dec 31, 2025 | Yes, from 7.92 | Yes (status report shows an error) | No | No |
| 8.2 | Dec 31, 2026 | Yes, from 7.94 | Yes | No | No |
| 8.3 | Dec 31, 2027 | Yes, from 7.103 | Yes | Yes | No |
| 8.4 | Dec 31, 2028 | No (ask an extended support vendor) | Yes (recommended for 10.6) | Yes (recommended for 11.3+) | No |
| 8.5 | Dec 31, 2029 | Not listed | No | 11.3 and 11.4 only | Yes (the minimum) |
| 8.6 | Not released | Not listed | No | No | Not yet |
Sources: PHP supported versions, PHP end-of-life branches, Drupal PHP requirements, Drupal 7 PHP requirements.
"No supported version of Drupal supports any version of PHP 7," says drupal.org. Drupal 7 can still run it, but Drupal 7 isn't supported either.
If you're on Drupal 10
Drupal 10.4 through 10.6 run PHP 8.1 through 8.4. Move to 8.3 or 8.4 now. Both work on Drupal 10 and Drupal 11, so the PHP change and the Drupal upgrade can happen on different days.
A Drupal 10 site on PHP 8.2 loses Drupal's security fixes on December 9 and PHP's on December 31. Two deadlines in one month is how sites end up rushed.
For the Drupal 11 side, use my 30-minute Drupal 11 readiness check. It covers the upgrade itself, so I won't repeat it here.
If you're on Drupal 11
Drupal 11 needs PHP 8.3 or later. PHP 8.4 is the recommended version for Drupal 11.3 and later (drupal.org issue #3554384).
PHP 8.5 works only on Drupal 11.3 and 11.4. It's also the only version Drupal 12 runs on.
So if you're on 11.3 or later, 8.5 is your next step after 8.4. Don't move there until your modules are ready for it.
If you're on Drupal 7
Drupal 7 lost drupal.org support on January 5, 2025 (Drupal 7 end of life). PHP is what will force you to move off it.
- Drupal 7 core runs PHP 8.3 only from version 7.103, the last release.
- drupal.org will never add PHP 8.4 support. It says so plainly: "No, will not get support."
- If you pay for Drupal 7 extended support, ask your vendor whether it covers PHP 8.4.
- PHP 8.3 gets its last security fix on December 31, 2027.
So for a Drupal 7 site without extended support, the last PHP version that core runs on, and that php.net still patches, runs out at the end of 2027.
Old Drupal 7 cores die on PHP 8. One owner on Reddit found their 7.66 site down with Class "DatabaseConnection" not found after the host moved to PHP 8.3 (r/drupal thread).
"I don't know when the PHP version was upgraded," they wrote. Going back to PHP 7.3 or 7.4 meant paying the host.
Your options, best first:
- Update Drupal 7 core to 7.103 and test on PHP 8.3. That's PHP's runway until the end of 2027, but Drupal 7 itself still gets no fixes from drupal.org.
- Update Drupal 7 core to 7.103.
- Scan the code before you switch (the steps are below).
- Test the site on PHP 8.3.
- Pay for extended support.
- drupal.org lists Drupal 7 extended security support vendors on its extended security support page.
- Some hosts also sell patched old PHP.
- Plan the rebuild. If the site matters, 2027 isn't far off.
Scanning a Drupal 7 site. Many Drupal 7 sites don't use Composer, so scan the code, contrib included.
With no composer.json in the site, install the scanner globally first, on the machine that runs the scan:
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require --dev phpcompatibility/php-compatibility:"^10.0.0@dev"
Then run the scan with phpcs from Composer's global bin folder (composer global config bin-dir --absolute shows where it is):
phpcs -p sites/all/modules sites/all/themes --standard=PHPCompatibility --runtime-set testVersion 8.3 --extensions=php,module,inc,install,theme,profile
Check the code on a copy before you switch
Changing PHP is a code change, even though it's one dropdown in a control panel. Clicking through a few pages misses code that runs only on cron, a rare form, or checkout. I do it in this order.
Moving from PHP 8.2 to 8.3? My 30-minute PHP 8.3 readiness check walks through each step with the commands.
1. Make a test copy that runs the same PHP as live. Many hosts call this a staging site. If the copy runs a different PHP than live, your test proves nothing.
This is the most common trap I see. The live PHP gets raised, and the copy stays behind.
If your developer's copy runs on DDEV, ddev config --php-version 8.3 sets it to match a live 8.3 site. DDEV's own default is 8.4, so a fresh copy can run newer PHP than live (DDEV docs).
2. Ask Composer what blocks the new version. Composer is the tool that installs Drupal and its modules on most modern sites. Run this in the site's folder:
composer why-not php 8.4
It lists every package that won't run on PHP 8.4 (Composer docs). The Upgrade Status module recommends the same composer why-not php check.
When nothing blocks the change, Composer says so: There is no installed package depending on "php" in versions not matching 8.4.
3. Check the server's real PHP against what's installed. Run this on the server:
composer check-platform-reqs
It compares the installed packages with the PHP that runs Composer, and lists anything missing or too old. That's the command-line PHP, so run php -v first and make sure it matches the website's version from the status report.
On hosts that build your site for you, this check usually runs in the build, not over SSH.
4. Pin Composer to the live PHP version. Run these two commands, with your live version:
composer config platform.php 8.3.0
composer update --lock
The first adds the pin inside the existing config block of composer.json. The second updates the lock file to match, without changing any packages.
Now a composer update on a laptop with newer PHP can't install packages that live can't run (Composer config docs).
The client site from earlier had no pin, so the next composer update could have broken live. Change the pin when you change the server.
5. Scan custom modules and themes. Composer only knows about packages. Your custom code needs a scanner. PHPCompatibility checks it against a PHP version:
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev phpcompatibility/php-compatibility:"^10.0.0@dev"
vendor/bin/phpcs -p web/modules/custom web/themes/custom --standard=PHPCompatibility --runtime-set testVersion 8.4 --extensions=php,module,inc,install,theme,profile,test --ignore=*/node_modules/*,*/vendor/*
- Keep the
--extensionspart. Without it, the scan skips.module,.installand.themefiles, which hold a lot of Drupal's older code. - If your site's folder is
docroot/instead ofweb/, change the paths to match. - If Composer refuses with a PHP_CodeSniffer version conflict, which can happen on sites that use
drupal/coder, install the scanner globally instead, as shown in the Drupal 7 section.
Use the 10.x version, as shown. It's still a pre-release (10.0.0-alpha2, November 2025), but the last stable release, 9.3.5, came out in 2019, before PHP 8 existed.
This step is one for your developer. If they already run PHPStan, its phpVersion setting gives a second opinion (PHPStan docs).
6. Switch the copy, then use it.
- Submit a form.
- Log in.
- Run checkout if you have one.
- Run cron.
- Read Recent log messages at
/admin/reports/dblogfor new PHP errors. That page exists only when the Database Logging module is on. - If it isn't, check your host's PHP error log.
7. Switch live, and know your way back. The rollback is usually the same setting, set back to the old version.
- Find it before you switch, not after.
- Check that the old version is still offered. Some hosts don't let you go back to a version they've retired.
Don't silence the check. If Composer or Drush stops with "Composer detected issues in your platform: Your Composer dependencies require a PHP version…", fix the PHP. Switching the check off, with Composer's platform-check setting or Drush's DRUSH_NO_MIN_PHP=1, runs code written for new PHP on old PHP.
No Composer on your site? If you installed Drupal by hand or through a one-click installer like Softaculous, steps 2 to 5 don't apply as written. Send this list to your developer, or ask your host for a copy of the site to test on.
How your host handles PHP, and where you switch it
When a PHP version reaches its end date, your host does one of four things:
- It upgrades you on its own.
- It charges you to stay behind.
- It sets a deadline you have to meet.
- It does nothing.
| Host | Upgrades PHP for you? | Charges to stay on old PHP? | Where you switch | Test copy? |
|---|---|---|---|---|
| Pantheon | Yes, when a version is removed | Not stated | pantheon.yml | Yes (Dev, Test) |
| Acquia | You do it by its deadline, then Acquia upgrades you | Has in the past (7.4) | Cloud UI, per environment | Yes (Dev, Stage) |
| Platform.sh / Upsun | Not stated | Not stated | Config YAML, per branch | Yes (branches) |
| GoDaddy (cPanel) | Not stated | Yes, at renewal | Settings > Server Settings | Not stated |
| Bluehost | Not stated | Not stated | Portal or MultiPHP Manager | Not stated |
| Other cPanel hosts | Varies | Varies | MultiPHP Manager or Select PHP Version | Rarely |
| Cloudways | Yes, with 7 days' email | Not stated | Application or server settings | Yes (staging app) |
| SiteGround | Yes, by default | Not stated | Site Tools > Devs > PHP Manager | Yes |
| Hostinger | Not stated | Not stated | hPanel > PHP Configuration | Varies |
| Your own server | No, it's your job | n/a | On the server | Only if you built one |
Every row comes from the host's own documentation, read in October 2026. "Not stated" means the docs don't say. Hosts change these pages often, so check yours.
Pantheon
You set PHP in a file in your site's code, pantheon.yml, at the top of the repository. The api_version line is already in that file. Add or change the php_version line:
api_version: 1
php_version: 8.4
You commit it, and the change goes to Dev first. Then it moves to Test and Live with your normal deploy. So you can't change live without testing first.
Never deploy the PHP change as a hotfix, because Pantheon doesn't pick up pantheon.yml changes that way.
The current version shows in the Site Dashboard under Settings > PHP version.
What Pantheon does at end of life:
- Support for PHP 5.6 through 7.3 and for 8.0 ended on September 30, 2026, and Pantheon says their removal is "imminent."
- When they're removed, sites still on them will be "automatically upgraded to the oldest available PHP version," which Pantheon warns "may result in broken functionality."
- PHP 8.1 stopped being offered to new sites on September 30, 2026. Existing sites keep it for now.
- PHP 7.4, which many Drupal 7 sites run, stops being offered to new sites on December 31, 2026.
- It promises at least 90 days' notice before it removes a version.
- It includes security patches for older PHP versions on its newer runtime, Runtime Generation 2.
Pantheon lists PHP 8.2 through 8.5 as supported. Since 8.2 ends on December 31, pick 8.4.
For help, open a ticket or chat from the dashboard. Which channels you get depends on your plan.
Acquia
You change PHP in the Cloud Platform interface:
- Choose the application.
- Choose the environment.
- Go to Actions > Configure Environment.
- Pick the version under PHP.
- Click Save.
It's set per environment, and Acquia's docs say to change Dev or Stage first and test there, before Production.
What Acquia does at end of life:
- PHP 8.2 ended on Acquia on October 1, 2026. PHP 8.3 ends there October 1, 2027.
- For both, Acquia's date falls three months before php.net's.
- These are "self-service" deadlines. You make the change, and Acquia says it will "enforce" them.
- For 8.2, Acquia said it would move every app still on it to PHP 8.4 on October 1, 2026.
- It also said owners couldn't choose the version, and that the deadline "will not be extended."
- For PHP 7.4, every customer got free support until March 29, 2024.
- After that, Acquia ran a paid PHP 7.4 long-term support program until November 30, 2025. That's a precedent, not a promise for future versions.
If your site was on 8.2 at Acquia, it's probably on 8.4 now, and it may not have been tested there.
- Check the status report.
- Test cron, forms and checkout.
For help, open a support ticket from the Help icon in the Cloud UI.
Platform.sh (now Upsun Fixed) and Upsun
PHP lives in your config file. On Platform.sh (Upsun Fixed), it's a top-level line in .platform.app.yaml:
type: 'php:8.4'
On Upsun, it sits under your app's name in .upsun/config.yaml:
applications:
myapp:
type: 'php:8.4'
Both also offer 8.5.
Every environment is a Git branch. To switch:
- Change it on a branch.
- Test that environment.
- Merge.
Upsun's docs describe no automatic upgrade. It already marks PHP 8.2 and 8.3 as "deprecated."
Its docs say deprecated versions are "no longer receiving security updates from upstream," even though php.net patches 8.3 until December 31, 2027. Plan for 8.4.
For help, open the Console, then Help > Support > Create a new request.
cPanel shared hosting at Bluehost, GoDaddy, Hosting.com and InMotion
Most budget hosts run cPanel. The catch is that cPanel can have two different PHP switches, and they fight.
- MultiPHP Manager is cPanel's own tool. It sets PHP per domain (cPanel docs).
- Select PHP Version comes from CloudLinux, which many shared hosts add. It sets PHP for your whole account (CloudLinux docs).
On a Drupal multisite, every site shares one codebase, so they all move PHP together. Test them as one switch.
If MultiPHP has your domain pinned to a version, your choice in Select PHP Version is ignored for that domain. CloudLinux's own setup notes say the domain has to be left on the system default for the selector to work. That's the usual reason behind "I changed the version and nothing happened."
PHP versions can also be set by a line in your .htaccess file. It typically looks like one of these:
AddHandler application/x-httpd-ea-php83 .php .php8 .phtml
AddHandler application/x-httpd-alt-php83___lsphp .php
- An
ea-phpline comes from MultiPHP Manager. - An
alt-phpline was usually added by hand, or by a host's tool, following the host's guide.
Either one overrides the selectors. When the version won't change, look for an old line like this first, including in a parent folder's .htaccess.
Watch for this one on Composer sites. If your document root is web/, MultiPHP writes its line into web/.htaccess. Drupal's Composer scaffold overwrites that file on core updates (Drupal's Composer scaffold docs).
So the next core update can delete the line, and your site falls back to the server's default PHP without any warning. Recheck the PHP version after every core update.
Your developer can stop it two ways:
- Add the handler line through the scaffold's append option.
- Exclude
.htaccessfrom the scaffold. That also works, but then core's security fixes to that file stop arriving.
Where to switch on the big names:
- Bluehost: Websites > Manage Site > Advanced > PHP Version, or cPanel > MultiPHP Manager (Bluehost help). Bluehost says versions below 8.2 are deprecated there.
- GoDaddy: Web Hosting > Manage > Settings > Server Settings > PHP Version (GoDaddy help).
- Hosting.com (formerly A2 Hosting): on the cPanel Tools page, in the Software section, click Select PHP Version (Hosting.com help).
- InMotion: cPanel > Software > MultiPHP Manager. On older shared servers, you may have to ask support to move your account to a newer server.
GoDaddy charges you to stay behind. GoDaddy's "PHP Extended Support" is "a paid add-on for websites hosted on versions of PHP that PHP.net no longer supports" (GoDaddy help). It's added automatically when your plan renews.
PHP 8.1 moved onto it on January 1, 2026. GoDaddy hasn't published a date for 8.2. Going by its own rule, I'd expect 8.2 sites to start paying after php.net ends 8.2 on December 31, 2026.
Owners on Reddit found the charge on their renewal bill (r/godaddy thread).
Most shared plans have no staging copy for Drupal. Ask your host whether they can make one before you switch.
Cloudways and SiteGround
Both upgrade PHP for you, and an upgrade nobody tested can break a site.
- Cloudways moved sites on PHP 5.6 through 7.3 up to 7.4 automatically, with an email 7 days ahead.
- You switch per application under Application Settings > PHP Settings.
- You switch for the whole server under Settings & Packages > Packages.
- Test on a staging copy first.
- Its newest version is 8.4. There's no 8.5 yet, which you'll need for Drupal 12.
- SiteGround has "Managed PHP" on by default. SiteGround "will periodically update the default PHP version" (SiteGround help).
- If you pick a version yourself, it stops upgrading you, and then upgrading is on you.
- You switch under Site Tools > Devs > PHP Manager.
One Drupal 9 owner found their site throwing errors after SiteGround's automatic move to 8.2 (r/drupal thread). If you stay on automatic upgrades, watch your email and test the copy when the notice comes.
Hostinger
You switch in hPanel > Websites > Dashboard > PHP Configuration.
- The setting applies to every website on your hosting plan at once. If you run two Drupal sites on one plan, you can't move one without the other, unless you add a per-folder rule in
.htaccess. - Hostinger also doesn't offer versions below 8.2. Once you move a site off an older version, you can't go back to it.
Your own server (a VPS on DigitalOcean, Linode, Hetzner or AWS Lightsail)
Nobody upgrades it for you, and nobody sends you a notice first.
Your PHP comes from the operating system unless you add another source:
| System | Default PHP |
|---|---|
| Ubuntu 22.04 | 8.1 |
| Ubuntu 24.04 | 8.3 |
| Ubuntu 26.04 | 8.5 |
| Debian 12 | 8.2 |
| Debian 13 | 8.4 |
Sources: Debian packages, Ubuntu packages on Launchpad.
Ubuntu keeps patching its own copy of PHP 8.1 on 22.04, even after php.net stopped, until 22.04's standard support ends in 2027 (Ubuntu release cycle). That doesn't help a Drupal 11 site, which needs 8.3 or later.
For other versions, most admins add the ondrej/php repository on Ubuntu or packages.sury.org on Debian.
The switch, in short:
- Install the new
phpX.Y-fpmpackage. - Install the same extensions you run now.
- Point the web server at the new version.
- Set the command-line PHP to match, so Drush and cron use the same version.
If your server came from AWS Lightsail's Bitnami Drupal image, AWS says that image "will be deprecated" on May 19, 2027.
Existing servers keep running, and "you are responsible for keeping your running instances up-to-date" (AWS Lightsail FAQ).
Who to contact, and what to ask
You need two people: your host and whoever works on your code. Send each one the list below.
Your host. Open a support ticket and paste these five questions:
- Which PHP versions do you offer on my plan today?
- When will you stop offering PHP 8.1, 8.2 and 8.3?
- Do you upgrade PHP automatically, and how much notice do you give?
- Do you charge to stay on an old version?
- Does the command-line PHP match the version my website runs?
Save the answers, so every PHP deadline for your site is in one place.
Your developer or support company. Ask for three things:
- The code check from this post, run on a copy that matches live.
- A written rollback: which setting, and what to set it back to.
- A date for the switch, before your host's deadline.
When the honest answer is "upgrade Drupal first." Old Drupal and old PHP can lock each other in.
I've seen a Drupal 9.5 site on PHP 8.1 that couldn't take a module's security update, because the update needed Drupal 10. The host's command-line tool had also stopped running on 8.1.
The PHP move and the Drupal upgrade had to be planned as one job. If your developer says this, believe them.
When your host can't run current PHP, move hosts. "My host also is stuck on older versions of php and mysql," one owner wrote on r/drupal. One reply was "Move to a different host" (r/drupal thread).
My notes on choosing a Drupal host can help.
After today, what to plan for and what to ignore
Act this month if:
- You run PHP 8.2 and have no plan to move before December 31, 2026.
- You run Drupal 7, on any PHP version. Your runway is shorter than you think (see the Drupal 7 section above).
- Your host can change PHP without asking you, and you don't know when it will.
Plan for next year if:
- You run PHP 8.3. It gets security fixes until December 31, 2027, so you have time.
Some hosts already call 8.3 old, though. Upsun lists 8.3 as "deprecated" today.
Ignore for now:
- PHP 8.6. Don't be first.
- It's due November 19, 2026 (PHP 8.6 timetable).
- No Drupal version supports it yet (Drupal PHP requirements).
- Deprecation notices in your logs on PHP 8.4. A deprecation notice is PHP saying "this still works, but it won't forever."
- Fix them when you update modules. They don't break the site today.
Your PHP survival checklist
Run this now, and again every January.
- Check your PHP version in the status report (
/admin/reports/status). - Find it in the table above.
- Note its end date.
- Send your host the five questions.
- Put your PHP end date and your host's deadline on the calendar.
- Run the code check on a copy that matches live.
- Switch the copy.
- Test the copy.
- Switch live.
- After each PHP security release, confirm your host applied the patch.
- Recheck next January.
Printable copy:
PHP SURVIVAL CHECKLIST
[ ] PHP version from /admin/reports/status: ______
[ ] End date of that version (php.net): ______
[ ] Host's answers to the 5 questions saved
[ ] End date and host deadline on the calendar
[ ] composer why-not php <new version> run on a copy
[ ] PHPCompatibility scan of custom code run
[ ] Copy switched and tested (form, login, checkout, cron, logs)
[ ] Live switched, rollback setting written down
[ ] Latest PHP security patch confirmed
[ ] Recheck date: January ______
Frequently Asked Questions
What PHP version does Drupal need?
Drupal 10 needs PHP 8.1 or later, Drupal 11 needs 8.3 or later, and Drupal 12 needs 8.5 (Drupal PHP requirements).
For a Drupal 10.6 or Drupal 11 site today, use PHP 8.4. It's the recommended version, and php.net supports it until December 31, 2028.
Is Drupal 7 compatible with PHP 8?
Yes, up to PHP 8.3, if you're on Drupal 7.103. Older Drupal 7 cores support fewer PHP 8 versions: 8.1 from 7.92 and 8.2 from 7.94.
drupal.org will never add PHP 8.4 support to Drupal 7. If you pay for extended support, ask your vendor about 8.4 (Drupal 7 PHP requirements).
Is PHP 8.0 still supported?
No. PHP 8.0 reached end of life on November 26, 2023, and PHP 8.1 on December 31, 2025 (PHP end-of-life branches). Neither gets security fixes from php.net.
Can I switch PHP back if my site breaks?
Usually, yes. It's the same setting in your host's panel or config file, set back to the old version.
Some hosts remove old versions, though, or charge for them. Hostinger, for one, doesn't offer versions below 8.2 at all.
Find the setting and confirm the old version is still offered before you switch.
Want someone to run the code check and make the switch for you? That's part of our Drupal maintenance plans. If you're on Drupal 7, our Drupal 7 support covers PHP 8 compatibility too.
Sources
- Drupal PSA-2026-10-20, critical PHP update
- PHP security advisory, October 21, 2026
- PHP's GitHub advisory for CVE-2026-109618
- Ubuntu, CVE-2026-109618
- Cloudflare, PHP2Shell WAF protection
- Wiz Research, PHP2Shell
- PHP Foundation, today's PHP security release
- PHP news archive, 2026
- PHP supported versions
- PHP end-of-life branches
- Drupal PHP requirements
- Drupal 7 PHP requirements
- Drupal core release schedule
- Drupal 7 end of life
- Composer command-line docs
- Composer config docs
- PHPCompatibility
- Drupal's Composer scaffold
- cPanel MultiPHP Manager
- GoDaddy PHP Extended Support
About the Author
Bob Kruse is the founder of Drupal Aid and a Drupal fanatic since 2008. Drupal Aid has provided Drupal maintenance and security support since 2014. Read more about Drupal Aid or contact us.




Comments
Have a question about this update? Ask it here.