Merchlint
Available now
Next, in this order
  • DeutschDE
  • EspañolES
  • FrançaisFR
  • ItalianoIT
  • PortuguêsPT
  • NederlandsNL
  • SvenskaSV
  • TürkçeTR

A language shows up here once its pages are actually written. Nothing on this site is machine-translated, except a few German and Spanish pages that no native speaker has reviewed yet.

Install free Install
← All checks

A plugin that needs newer PHP than you run

An active plugin requires a newer PHP version than this server runs. Nothing fails today. It fails on whichever line of newer code is reached first.

Group
Environment
Confidence
F — fact read directly from your store
Name on the plugin screen
Plugin needs a newer PHP
Included in
the Pro add-on, still being prepared
Updated
Code
E6

The symptom

The plugin has been active for months. Its header says Requires PHP: 8.1. The server runs 8.0. Nothing on the store looks wrong.

WordPress checks this requirement only when you install or activate a plugin. A plugin that was already active when the PHP version went down—after a move to another host, a server change or a restored backup—is never checked again. The same goes for a newer version uploaded by FTP over an active plugin. The only sign is a red line under the plugin on the Plugins screen: “This plugin does not work with your version of PHP.”

What it costs

Incompatible PHP does not fail gradually. It fails on the exact request that first reaches a line using syntax the interpreter does not know, and a parse error is fatal:

  • It fails all at once. PHP cannot run part of a file. The page that loads that file shows “There has been a critical error on this website.”, and if the file loads on every request, the whole store is down.
  • It waits for a rare code path. The new syntax may sit in the refund handler, the tax calculation for one country, or the admin screen you open twice a year. It has not fired yet.
  • It fires during updates. Plugin updates are exactly when new code lands, so the most likely moment for this to break is the moment you are already changing something else.
  • Where it fails matters. If the error is in payment or checkout, you find out from customers.

How to check it yourself

WP-CLI reads the plugin headers, and PHP reports its own version:

php -r 'echo PHP_VERSION, "\n";'
wp plugin list --status=active --fields=name,version --format=table

The requirement itself is in the header of each plugin’s main file:

grep -ri "Requires PHP" wp-content/plugins/*/*.php | grep -v "Requires PHP: *$"

Compare each result against the PHP version your web server uses, which is in Tools → Site Health → Info → Server (the command line can run a different one). WordPress also makes this comparison on the Plugins screen: under a plugin that needs newer PHP, a red notice says “This plugin does not work with your version of PHP.”

How to fix it

  1. Raise PHP rather than downgrade the plugin. Newer PHP is generally faster, and a store on 8.0 is already past its own security window.
  2. Test on a staging copy first, with every plugin active. The failures you are looking for are the ones that only appear on specific screens.
  3. If a plugin cannot run on the newer version, that plugin—not the server—is the thing to replace. A plugin that cannot follow PHP is not being maintained.
  4. Re-check after every migration. Moving a site to a new host is the most common way this mismatch is created.

When it’s a false alarm

  • Plugins with a wrong or stale header. Some authors bump Requires PHP defensively, ahead of actually using newer syntax. The declaration is a promise about support, not always a technical requirement.
  • Code paths that never run in your configuration—a plugin whose newer syntax lives only in an integration you have not enabled.
  • Hosts that run one PHP version on the command line and another for the web server. If the scan ran from WP-CLI, check the version the web server uses before you act.

How Merchlint finds it

Merchlint reads the Requires PHP header of every active plugin, including network-activated ones on a multisite, and compares it with the PHP version that runs the scan. A scan started in the admin normally runs on the web server’s PHP; a scan started from WP-CLI uses the command-line PHP, which can be a different version. Each plugin whose requirement is higher becomes a finding with the plugin’s name, its file, the PHP version it requires and the version that ran the scan.

A plugin with no Requires PHP header is not reported. Themes are not checked.

Confidence: F—fact from the environment. One version number is lower than the other.

This check is part of the Pro add-on, which is still being prepared. The free plugin does not run it.

Install free

Doesn't match what you see in your store? Email us—we read every message. contact@merchlint.com