Skip to main content
WordPress Support

WPTavern: Now Allows Plugin Authors to Specify a Minimum PHP Version Requirement

By 30/08/2017October 24th, 2017No Comments

WPTavern: Now Allows Plugin Authors to Specify a Minimum PHP Version Requirement

Although WordPress core currently maintains backwards compatibility with PHP 5.2.4+, plugin and theme authors are not required to do so. When developers include features that require more recent versions of PHP, it can break sites or cause otherwise unexpected behavior. As part of a larger effort to encourage users to upgrade their PHP versions, now allows plugin authors to specify a minimum PHP version requirement in the readme.txt file with a new Requires PHP header. It is displayed to users in the sidebar of the plugin’s description:

This addition to the readme.txt file has been well-received by developers who are already updating their plugins in the directory with minimum PHP version requirements. It also complements WordPress’ Core PHP team’s recent efforts to educate users about the benefits of upgrading PHP, as the minimum supported version was released 10 years ago and hasn’t received security patches for nearly seven years.

“As a plugin developer (who maintains my plugins in my spare time), it is becoming increasingly difficult to build new functionality that works in older versions of PHP,” Paul Gilzow commented on the announcement. “There are some things that simply cannot be done in the older versions, and in those cases, I have to build out functionality to check PHP versions and disable those features. That takes time and energy away from building out other new features.”

WordPress Core Committer Sergey Biryukov said the next step is exploring the possibility of displaying a notice to users when they cannot install a theme or plugin due to their installations not meeting the required criteria. Ideally, these notices would include host-specific instructions to assist users in getting their sites upgraded to a newer PHP version. This particular move could make a significant impact on the wider WordPress community, if popular plugins start triggering notices requiring newer versions of PHP.

Source: WordPress