Upgrading PHP

Since 2017, EWWW IO has joined an effort by a wide number of developers to encourage folks to upgrade PHP to a newer version. But perhaps that's like a foreign language to you, so I want to help you understand a few things:

  • What is the problem?
  • Why should we care?
  • Why do I expect you to do something about it?

Shortcut, if you don't care about the why, and just want to get rolling, make sure your site is ready to upgrade, and then ask your webhost to find out how to do it (usually they will do it for you, but take a backup first). EWWW IO is currently supported on PHP 7.1 - 7.4. I use it on PHP 7.4 everyday, and you can see the status of the tests on various PHP versions every time I check-in the code to GitHub. It should also work on PHP 8 just fine, but I don't frequently test that yet (as of June 2021).

What's a PHP? What are these versions you speak of?

WordPress, (like the EWWW Image Optimizer), is built with several different programming languages, but the majority is written in a language called PHP. Just like WordPress, the PHP language has been improved over time. Some of these changes are gradual, and some have been incredible performance improvements. Developers everywhere are using the new features found in newer versions of PHP and loving the performance gains of modern versions. More importantly, everyone gets to enjoy the increased security found in these new versions. In the past, WordPress developers have been left out in the cold and received none of these benefits. What?!?! Why not?
PHP has a much more aggressive update path than WordPress. No version of PHP 5 receives security updates and even WordPress core has dropped support for anything below PHP 5.6 (they recommend 7.4). PHP 7 is the future and it is fast. Well... technically PHP 8 is now the future, but we're mostly concerned about getting folks off of the ancient 5.x branch.
There are a lot of us who pushed for core WordPress to move the requirement up to PHP 5.6, and it finally happened! To help that effort, we're doing what we can to push things along. Currently, EWWW IO does not support anything below version 7.1.

Why do you care so much?

I care about a lot of things, but two things are very important to me: Security & Speed.


The single most important reason to increase the minimum requirement is security: PHP versions 5.2 through to 7.0 are still being used on millions of sites, but they no longer get security updates.
This security concern is not theoretical, this is your business we're talking about here. The number one reason sites get hacked is because of outdated software. Running old versions of PHP is just plain dangerous, as major security issues have been found, and go unfixed. WordPress implemented automatic security updates for exactly this reason.


Another big issue is speed. Sometimes folks blame WordPress for being slow, but it doesn’t have to be be that way. If it’s running on old versions of PHP, it will be unnecessarily slow, even more so as you add plugins to your site for desired functionality. PHP 5.2 is over 100% slower than PHP 5.6, and a staggering 400% slower than PHP 7 ( source).

Why don’t web hosts update PHP?

There are some web hosts that just don't care, but there IS one thing that strikes a web host with fear. They are afraid to break your site. Some software (really ancient stuff that you don't want to be using anyway) may not support newer PHP versions. But really, you shouldn’t have to worry about that, your web host should just take care of business and do the upgrades to keep your site safe and secure. Plus, did we mention it's faster? Oh yeah, we did... well it is!

What is EWWW IO going to do?

There are a lot of reasons to push the minimum version of PHP forward. While plugin developers don't have the power to decide on minimum requirements, we can help in a different way.
As of EWWW IO 3.3 (2017), we started showing a notice on the WordPress dashboard to administrators of sites running on PHP 5.2. This notice is bold, red, and non-dismissible. Sort of... If you upgrade PHP, it goes away, and the plugin starts working again.
It is my hope that the notice will encourage people to contact their host if they don’t know how to upgrade PHP. This could mean some work for web hosts, isn't that a horrid thought (sarcasm, in case you missed it)? This notice is deliberately intended to make web hosts do their jobs.
As a last resort, if your web host is not willing to upgrade PHP for your site, we recommend that you get better hosting. Yoast has a list of web hosts that use modern PHP versions by default, but I personally recommend WP Engine, a2 Hosting, Kinsta, and Flywheel. There are no affiliate links involved here, this is not about making money (not for me anyway)! This is all about making your site safer and faster.

When will it stop?

When the world ends... No really, PHP development is not standing still, and even support for PHP 7.3 is scheduled to end in December 2021. But as 5.6-7.2 are used by a LOT of sites still, we'll be a littler gentler about our nudges.
Don't put it off, make your site faster and safer today!