Good idea to make PHP >= 5.3 a requirement for a WP plugin?

wordpress

#1

I’m planning to integrate some libraries in my plugin which uses Namespaces which requires at least version 5.3 while WordPress requires only 5.2.4

So should I built in a fallback or just stick with version 5.3?


#2

I personally wouldn’t put a fall back as most hosts should be on 5.3, as long as you warn the purchaser before they do buy then you should be ok, WP has finally removed PHP4 code so shouldn’t be too long before the minimum is upgraded to 5.3


#3

I’ve already put an minimum requirement a couple of month ago but there are still users which may have an older version. Also my plugin autoupdates if users decided so and if it suddenly breaks they surely get angry :dizzy_face:


#4

No no no. You should always respect the minimum requirements of the platform you are using (hence WordPress, hence 5.2.4). By asking for a different version you will only complicate things for your users and, worst of all, create frustration among not so savvy WordPress users that are trying to follow the rules (i.e. WordPress rules).


#5

Is it okay to require from theme buyers PHP 5.3 or higher. 5.2 is obsolete and doesn’t have have namespaces which is crucial for any serious work with big projects.


#6

We require PHP v5.3 or later in all our themes since 2012. It comes up about once in 250 purchases (probably less).

In the theme, we do a version check and show a notice with the current PHP version and instructions on how to specify using .htaccess to set the version for their site. We also tell them if the .htaccess fix fails to contact their host who can update their account. When it does come up in those rare cases in our support, we tell the customer they should find another host if they will not upgrade the PHP version. All of them have appreciated this.

WordPress is lagging far behind in its required PHP version. Much like the extermination of IE6 through companies like Google dropping support, I think WordPress is more likely to make this long overdue change if more plugin/theme developers do it first.


#7

No point supporting old technology, when it’s so simple to use PHP 5.3+. Any host that doesn’t offer over 5.3 shouldn’t be hosting websites! PHP7 will be here soon.


#8

yes but do people upgrade? One of my shared hosts are still running on 5.2.x and while you can update you have to do it manually so I doubt the average user is capable to do so or is just afraid of this step


#9

I think it’s probably quite a rare occurrence. Most hosts will be able to upgrade you via support, or you can add the snippet to htaccess.

If we constantly panda to the past, we’ll never be able to move forward with new technologies.


#10

Exactly! I think I’ll simple add a notification for users with an outdated version to upgrade. Thank @all


#11

One of my items is 5.3+ and I haven’t had too many issues, except one VERY vocal buyer who spent a week posting complaints about having to ugprade hosting just to get the item working.

Generally I say “contact the host to ugprade php” and never hear back, so assume it works. Most hosts should have it as a push-button upgrade.

Please share screenshots of any “update notifications” you implement and let us know how it goes :slight_smile: