Happy Developers, Happy Ecosystem: The Intangible Impact of WordPress’ Minimum PHP Version Bump

The following is a guest post by Chris Van Patten, founder of Tomodomo, a digital agency for magazine publishers.


For years, WordPress has been ever-so-slightly behind the times on PHP version support…to put it kindly.

However, WordPress’ legendary support for PHP versions back to 5.2 — versions long unsupported by the PHP project itself — wasn’t born out of a “we hate developers” strategy (although you’d be forgiven for thinking so given the reaction that policy often gets from developers). Instead, it was a genuinely noble and pragmatic effort to make WordPress, and thus publishing on the web, as widely available as possible.

Despite the reaction from many developers (and security-minded sysadmins), that strategy worked: WordPress powers over 30% of the web, and a significant chunk of those installations are on unsupported PHP versions. For those users, it’s not that they don’t care that they are on an unsupported version of PHP; they just don’t know, or don’t know how to solve the problem.

But the winds of progress are blowing, and in 2019 WordPress is planning to make a change. Assuming everything goes according to plan, PHP 5.6 will become the minimum supported version in the first half of the year, and the minimum version will be bumped again to PHP 7 in the second half of 2019.

There are obvious benefits here from a security perspective. The oldest versions of PHP supported by WordPress today stopped receiving official security updates ages ago (PHP 5.2 hit EOL, or “end-of-life,” nearly 8 years ago). The speed improvements will be tremendous as well, particularly in PHP 7. Speaking from my own experience, I have several sites that once needed aggressive caching to prevent server overload. Since PHP 7, they run faster than ever, without caching of any kind.

Speed and security are the two most-cited reasons (and the most measurable reasons) for bumping the minimum version, but there are also other less tangible benefits that will filter well beyond WordPress core development.

Simplified support

While plugin developers have never been obligated to support all the versions of PHP that WordPress core does, many still chose to do so. That’s understandable: it could be tough to explain to a user why they can install WordPress in a certain development environment but couldn’t install a certain plugin.

For plugins that tried to match core’s backward compatibility support, that means testing and supporting up to nine versions of PHP: 5.2 through 5.6, and 7.0 through 7.3. (There was no PHP 6. I won’t bother explaining the boring reasons why.)

By pushing to 5.6, and eventually some version of PHP 7+, that cuts the number of versions that developers will feel compelled to support in half. In some way, Core will likely continue to support these old versions (through security backports to old versions of WordPress, for instance) but plugin developers can be assured that they don’t need to — and don’t need to feel any semblance of guilt about it either.

Happier developers

Even developers who are excited about the WordPress platform as a whole are likely to admit that it’s maybe not the most exciting code-base in the world. Over the past few years, I’ve seen a number of examples of developers who once limited themselves to WordPress now stretching into other frameworks and languages: Laravel, JavaScript, and Go are all popular new homes for WordPress expats.

Bumping the minimum version won’t change that apathy or exodus overnight, but it will give developers something to feel excited about. Modern PHP versions (especially PHP 7) offer genuinely cool new language features that make it easy to write performant, well-designed, and interesting code. I would even argue that it makes it fun. Modern PHP contains plenty of syntactic sugar, and while you shouldn’t base your diet on sugar it certainly makes for a nice treat.

Again, it is unlikely that core will start adopting these new language features on day one. The real benefit is that developers will feel empowered and secure in their decisions to start using these new capabilities, and will start to build plugins and themes that can borrow ideas from best practices in the broader PHP community.

Celebrating the intangible

While the measurable justifications for changing the minimum PHP version are certainly compelling, I think it’s also important to acknowledge these intangibles and indeed celebrate them. Bumping these versions will create a ripple effect across the ecosystem that will make developers more comfortable with writing modern code. It will reduce support and QA loads for companies that no longer need to support 9 different versions of PHP. It will make WordPress core a more attractive place to contribute.

Gutenberg, and all the modern tooling and architecture it brought, has already reinvigorated developers across the ecosystem and brought a huge number of new core contributors (myself among them). Embracing modern PHP is another step forward, and with other changes on the horizon (such as a move from SVN to Git, coding standards changes, and projects like Tide which embrace new languages and architectures) I hope that 2019 will be the year WordPress delivers not only a best-in-class user experience, but a best-in-class developer experience too.

13 Comments


  1. A look at the statistics are fascinating (not only PHP versions). PHP 7.3 is almost a blip (it does not show in the chart), but will likely pick up speed. 40% are already on 7.0 or greater. A full 24.6% currently are running PHP versions lower than 5.6, something that will take a LONG time to change.

    About 20% are running very old WordPress versions.

    Looking at RTL locales, it is interesting to me that 0.8% are Farsi, while Arabic is only 0.3% (surprisingly matching Hebrew that I expected to be much lower than Arabic based on population).

    Report


  2. You’re right. WordPress forcing a tangible bump to the speed of websites is a significant incentive.

    Looked from another perspective, how many game developers write their software targeting DX9 on Windows XP SP2 or Mac OS X 10.4 Tiger?

    There have been many advances introduced to web development since 5.2’s release in 2006. A developer of plugins for general use has to ignore the version restriction or 12 years of innovation. 12 years is a LONG time of doing things the old fashioned way. It makes features like name spaces, that were added to PHP way back in 2014, seem new hat. “4 years old” is not new in any shape or form.

    Report


  3. I’m so happy that they going faster implement to newest PHP versions.

    Just now i’m testing php 7.3 and its 30% faster than php 7.0 (based on php benchmark script!).

    the gap between 5.6 and 7.3 performance is huge – i would say close to 250%

    Report


  4. best-in-class developer experience

    That ship sailed when Matt made all GB decisions behind closed doors, forced breaking changes in every other version of GB (Elliot of ACF was mighty unimpressed) and Otto told everyone that reviews don’t matter.

    The reviews were never any kind of “make or break” for the new direction. The new direction was decided and final years ago, when the work began.

    Continued calls in the reviews to roll it back are kind of wasted effort. It’s not rolling back. Adapt, or move on.

    WordPress is no longer developer friendly, and Otto and Matt have proved it.

    Report


    1. This article was only talking about bumping the recommended version, not actually changing the required minimum version :)

      Report


  5. This has taken a long time, but it’s good to see it finally happening. Hopefully the project doesn’t put itself in this type of situation again. I don’t think many people agreed with the official stance on this, so it will be nice to see the community move forward in agreement now.

    Matt Mullenweg wrote an interesting article on this back in 2007.
    https://ma.tt/2007/07/on-php/

    I think he has really good points there, but WordPress unfortunately can not dictate how PHP handles it’s implementation and forking PHP was never an option, so bump WordPress requirements to match those of the official PHP project is the only sensible option IMHO.

    Report


  6. Nothing is happening yet. There is still legacy code there.

    Just by saying that WordPress is now PHP 7+ compatible doesn’t make it faster.

    Just by checking that WordPress is now running on a PHP 7+ platform doesn’t make it faster.

    Lots of files need to be cleaned up, refactored or improved to actually use the PHP 7 features.

    Report


    1. No. You get a faster WordPress just by moving from 5.6 to 7.X. Please, don’t spread missinformation.

      Report


      1. It’s not me who’s spreading misinformation.

        PHP 7 is way faster than 5.6, but that doesn’t mean WordPress doesn’t have any legacy code. PHP 7+ compatible means they fixed several deprecated functions.

        Report


  7. Here’s hoping hosting companies will get with the program. Almost half of the hosts our clients use still offer PHP 5.6 or PHP 7.0 at a maximum, both of which are either EOL’d already or will be 5 days from now. We work on educating our clients about the importance of an up-to-date PHP version, but many find moving hosts a daunting prospect, no matter how easy we make it for them.

    Report


  8. I think they should just move away from 5.* versions as fast as possible. It is incredible how slow and troublesome old versions are compared to PHP 7.0+

    Report

Comments are closed.