Minimum Required PHP version

Minimum Required PHP version for Plugins

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.

 

New field in the plugin directory
New field in the plugin directory

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:

 

The old "version" tab
The old “version” tab

 

The new "version" tab
The new “version” tab

On behalf of the GenerateWP team, good luck on your jorney of creating awesome plugins.

Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on whatsapp
Share on email
Rami Yushuvaev

Rami Yushuvaev

I'm an entrepreneur, a web developer and a blogger. I’ve contributed code to each and every release since WordPress 2.8. I'm the Hebrew GTE responsible for the translation and the release of WordPress Hebrew version. The founder GenerateWP.com and several other WordPress related projects. I work mainly with Israeli startups and hi-tech companies, providing development services.

3 Comments:

Leave a Reply

Subscribe to our Blog

Receive email notifications when new blog posts are published.