WordPress development is taking a big step forward to in encouraging adoption of up-to-date technologies, And this time its in the form of “Minimum PHP version” required to run a plugin. As of yesterday, plugin developers can set the minimum PHP version required in order to run their plugins.
A Small Step for WordPress, a Giant Leap for Plugin Developers
For the last several years plugin developers requested more flexibility with their plugins. Many developers don’t want to support old PHP versions, they prefer to adopt new language-inherited features and the latest PHP standards.
Up until now, plugin developers could not set the minimum required PHP version just like they could set the minimum required WordPress version. The plugin directory and WordPress core did not support that. So, many developers used their own custom solutions to limit plugin activation on sites using old PHP versions. As of now, no custom solutions are necessary, WordPress will handle that in Core.
The change didn’t happen due to developers request, it was part of an effort to make people upgrade to newer PHP versions and to help accelerate the abandonment rate of PHP 5.2.
The first step is to allow plugin developers to set minimum PHP version. Then to update the Plugin Directory to display minimum required PHP version. The last step will be to update WordPress itself — this functionality will probably be integrated into WordPress 4.9 or WordPress 5.0.
The New Header Field
WordPress introduces a new
Requires PHP: header in the
readme.txt file. It allows developers to set a minimum required PHP version for their plugins.
Updated Plugin Readme Generator
Our Plugin Readme Generator was updated to support this new feature. Now you can set not only the minimum required WordPress version, but also a minimum required PHP version.
Navigate to the “Versions” tab and set your minimum required versions:
On behalf of the GenerateWP team, good luck on your jorney of creating awesome plugins.