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.
Upgrade to GenerateWP Premium and enjoy PHP7 compatible code Upgrade Now
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.
3 Comments:
Aniket Belwalkar
Great work buddy.
I would also like to see an option to add WooCommerce version for WooCommerce custom plugins structure developed from your software.
Refer – https://woocommerce.wordpress.com/2017/08/28/new-version-check-in-woocommerce-3-2/
Thank you for making developer’s job easy.
Collins Agbonghama
+1 for this. I have a couple of WooCommerce plugins. This will surely reduce support loads.
Wes Foster
This is a huge step forward and I’m glad to say that WP is continuing this *forceful* approach to improving website security. Expect to see more of this now, especially due to the recent backdoor threats that have been popping up in WP plugins!