Safeguard
Developer Tools•

How do you find plugins that need a newer PHP than a client site runs?

Use the Requires PHP plugin header and WP-CLI's requires_php field to spot plugin and PHP mismatches across client sites before an update breaks one.

Safeguard Security Team
3 min read

Export each site's plugin list with the requires and requires_php fields, then compare them with the PHP version that site runs. Plugins whose minimum PHP is above the server's version will fail or be held back. Plugins whose minimum is far below current PHP are a hint that they are old.

Where the data comes from

The plugin header documentation defines two fields: Requires at least, the lowest WordPress version the plugin works on, and Requires PHP, the minimum PHP version. The WP-CLI list command can print both as optional fields named requires and requires_php, along with tested_up_to.

wp plugin list --fields=name,version,requires,requires_php,tested_up_to --format=csv
wp --info

The second command prints environment details, including the PHP version, so you can record both in one pass.

Build the comparison

  1. Run both commands on every site and save the output with the site name.
  2. Put plugin rows and the site PHP version in one sheet.
  3. Flag rows where requires_php is higher than the site's PHP.
  4. Flag rows where the plugin has no value at all, since that means the author did not declare one.
  5. Review flagged items with the client and schedule the work.

How to read the results

ResultMeaningAction
Minimum PHP above site PHPUpdate will not install or run cleanlyUpgrade PHP first, or hold the plugin
Site on a PHP version near end of supportFuture plugin releases may stop supporting itPlan an upgrade
Header blankAuthor did not declare a minimumTest on staging before updating
Tested up to is far behind current WordPressPlugin may not be maintainedCheck the plugin page and last update

Why this is a supply chain issue

An old PHP version limits which plugin releases you can install, so security fixes in newer releases may be out of reach. That ties patching to hosting. See our post on what to tell a client whose site is on old PHP for the conversation.

Treat a blank or very old tested_up_to value as a prompt to look, not proof of a problem. Pair it with the directory status check in our post on finding plugins no longer listed on WordPress.org.

Make it routine

Add the PHP check to the same weekly export you use for the inventory. When a client asks why their site cannot take an update, the sheet gives you the answer.

Planning the upgrade

Group sites by PHP version and by the highest minimum PHP any of their plugins require. Upgrade the groups with the biggest gap first, on staging, and test the key flows. Tell clients early, since a PHP change can involve their host and sometimes a paid plugin renewal. Keep the sheet for the next review so you can show progress over time.

Quick check

Does WordPress enforce Requires PHP?

The header declares the minimum, and WordPress uses it, but always confirm on staging for plugins you depend on.

What if requires_php is empty?

The author did not declare one. Test before updating.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.