DEV Community

Markus Delos Santos
Markus Delos Santos

Posted on Originally published at brightlabs.app

Does Requires PHP on a WordPress plugin set a maximum PHP version?

You check a plugin's listing before a server upgrade, see Requires PHP listed as 7.4 and Tested up to matching your WordPress release, and assume it's ready for PHP 8.4 or 8.5. It isn't: neither field sets a maximum PHP version or tells you whether the plugin works on newer PHP releases.

In WordPress plugin headers, Requires PHP only names the minimum PHP version the plugin needs. Tested up to only tells you the version of WordPress the plugin was tested against, not PHP. To check whether your plugins and theme are ready for a PHP upgrade, review their update history, scan the code, and test on staging.

What Requires PHP and Tested up to actually mean

Plugin headers declare minimums, not upper limits on PHP. In a plugin's main PHP file, the Plugin Handbook lists available header fields. Requires PHP is the minimum required PHP version, and Requires at least is the lowest WordPress version the plugin will work on.

Tested up to lives in the plugin readme file and records the version of WordPress the plugin has been tested against. This field ignores minor versions and says nothing about PHP. Since WordPress 5.8, plugin readme files are not parsed for requirements.

Field Where it lives What it tells you What it leaves out
Requires PHP Main PHP file Minimum required PHP version Maximum supported PHP version
Requires at least Main PHP file Lowest WordPress version PHP compatibility
Tested up to Plugin readme file WordPress version tested (ignores minor versions) PHP version tested

Here's the catch when you scan your plugin list before switching PHP. A plugin with Requires PHP set to 7.4 only states a minimum requirement. That header gives you no signal about whether the plugin's code works on PHP 8.3, 8.4, or 8.5.

Why WordPress core compatibility does not clear your plugins

WordPress core tracks PHP compatibility on its own schedule, separate from individual plugins and themes. WordPress 6.7 added beta support for PHP 8.4, and in July 2025 WordPress 6.8 raised PHP 8.3 support to fully compatible. WordPress 6.9 added beta support for PHP 8.5, and WordPress 7.0 dropped support for PHP 7.2 and 7.3.

Even when WordPress core supports newer PHP, your plugins and themes still need testing. WordPress.org notes that WordPress itself works with PHP as far back as version 7.4. It also warns that themes and plugins should be tested to make sure they work on newer PHP versions. Checking core support alone leaves your plugins unverified.

Check maintenance status and scan plugin code first

Start by checking what PHP version your site runs right now before touching any hosting setting. From the WordPress Dashboard, open Tools > Site Health, go to Info, and expand the Server section to see your PHP version. Then head to the Updates page in your Dashboard to update everything first.

Next, check each plugin's maintenance history instead of trusting its Requires PHP line. WordPress.org advises making sure your themes and plugins are actively maintained by checking when each was last updated. If you're unsure whether a theme or plugin works with newer versions of PHP, ask its developer.

  • Check your current PHP version under Tools > Site Health > Info > Server before planning any jump.
  • Head to the Updates page in your Dashboard to update everything first so you don't test outdated code.
  • Check when each theme and plugin was last updated to make sure it is actively maintained.
  • Scan installed plugin and theme files for deprecated or removed PHP calls before changing the server.

For that code scan, we built Bright Labs Compatibility Scanner for PHP, a free WordPress plugin. It reads the code of every installed plugin and theme for calls removed or deprecated in PHP 8.2 to 8.5, and lists each file and line it finds. Because the scan runs inside WordPress in short steps with no exec() and no shell access, it works without server command-line tools, and your code stays on your own server.

Treat a clean scan as a useful signal, not a pass-fail promise. Reading code without running it can miss problems in code built at runtime and flag code that never runs. Under Tools > Bright Labs Compatibility Scanner for PHP > Settings, you can also enable the optional update pre-scan to show warnings on Dashboard > Updates and the Plugins screen if an offered update has errors on your server's PHP version, without ever stopping, delaying, or changing an update.

Test the new PHP version on staging with debug logging on

Once your updates and code scan look clean, test the target PHP version on staging before touching production. WordPress.org advises that if your hosting company offers a staging site, you should update PHP there first and test your site before updating your live site. Testing real pages on staging catches runtime issues before your live visitors hit them.

Before testing pages on staging, turn on WordPress debug logging in wp-config.php while keeping errors out of page HTML. WordPress's debugging guide enables WP_DEBUG and WP_DEBUG_LOG while setting WP_DEBUG_DISPLAY to false and disabling display_errors. That setup logs all errors, notices, warnings, and notices about deprecated WordPress functions and arguments to debug.log in wp-content, while hiding errors so they don't interrupt page generation.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
Enter fullscreen mode Exit fullscreen mode

Use these debug tools in a local development or staging environment, not directly on a production site. With logging on and staging switched to your target PHP version, click through your public pages, forms, checkout or login flows, and admin screens. Then open debug.log in wp-content to review every error, warning, and deprecation notice before you schedule the live switch.

Back up before you switch the live site

Make a full backup of your website before changing PHP on your live site. WordPress.org notes that a backup lets you revert your site to how it is right now if anything goes wrong. Keep your hosting panel open when you apply the new PHP version so you can test key pages right away.

If you run into issues after updating PHP, change the PHP version back yourself, or contact your hosting company or a professional web developer. If something goes wrong and you need to restore your backup, WordPress.org recommends contacting your host to ask them to restore the previous version of PHP you had running first. Once the live site is back on a working PHP version, fix or replace the failing plugin on staging.

Sources

Frequently Asked Questions

Does Tested up to on a WordPress plugin tell you which PHP version it supports?

No. Tested up to only records the version of WordPress that the plugin has been tested against, and that field ignores minor versions. It does not measure PHP compatibility.

Why can a plugin with Requires PHP 7.4 still fail on PHP 8.4 or 8.5?

Requires PHP only sets the minimum required PHP version for the plugin, not a maximum PHP version. Because WordPress itself works with PHP as far back as 7.4 while plugins and themes must be tested on newer PHP releases, meeting the minimum requirement does not confirm newer PHP support.

Does a clean scan in Bright Labs Compatibility Scanner for PHP mean my site will work after upgrading PHP?

No. Bright Labs Compatibility Scanner for PHP reads plugin and theme code without running it, so it can miss issues in code built at runtime and flag code that never runs. Treat a clean scan as a good sign, and test on staging with WP_DEBUG_LOG enabled before changing your live site.


Originally published on Bright Labs.

Top comments (0)