The PHP 5.2 burden of WordPress

Hello Folks, long time no see. My self-employment consumes much time but after a great start I finally manage to have time for this blog again. And I am bringing unsettling news: WordPress has a problem!

Spoiler: It’s about technical debt and old PHP versions!

The problem of leading so many people

We know that moving a big mass is very hard, slow and sometimes upsetting. In general we experience this in two ways. Either you pull someone towards your target or you push this person there. Pull expects others to move without the need to move and push has the effort to help each on until the whole group crossed the finish line.

(okay, wait. The “teacher” in me wants to say: “there are more ways but lets stick to the major two.”.)

Pull people to the sunshine

If you want to move people away from the dark side you can show up the advantages of the more modern solutions. Doing this gives them the freedom to decide about an upgrade and some intrinsic motivation happens.

Image result for free hugs
Find this image on https://www.flickr.com/photos/stillwanderer/3314737024 (without changes)

Sounds easy? It isn’t. We all had a brilliant idea once but did we manage to immediately convince people? It takes time because …

  • Those advantages are very technical and can only be sold as “performance” and “security” enhancements.
  • Some people may not hear you scream those advantages as their WP are either dead or for an intranet.
  • Moving towards you has some costs like upgrading the hosting and (even worse) fix very old plugins that break due to incompatibility.

So pulling people towards you is an effort for them which make plenty site-owner resign. Lets fix that …

Pushing people to the wonderland

Another way would be to push the remaining part towards the new world. Give them a hand and walk side-by-side with them along the way. This helping hand is what they want, when it comes to things they neither understand nor have time for. But don’t drag them to the finish line – gently push.

Vroooooooom!

So this other side sounds good too but it also has some problems:

  • Too much pressure/changes and some people fall off the road (moving away from WordPress).
  • Walking slower than the steady progress of technology will leave you and your protégé behind.
  • Educating everyone about the topic is hard because one half doesn’t care and the other doesn’t understand.

Your words must be wide spread enough to meet every kind of technical expertise. During my study as a teacher I’ve learned: Classes with 15 students are perfect to educate but more is almost impossible – the larger the harder. But all in all we have a pull and a push – so we’re good right? Well, not really.

Do the IDGAF

What if I told you, that “don’t care at all” is a solution? Imagine WordPress still supports PHP 5.2 but no longer with WP 5.0 and beyond. This isn’t crazy, that’s the actual way how WordPress does things and it’s great.

Don’t make me think – WordPress has a strategy for this

We had such situations and still have them today with WordPress:

So it just happens from time to time but WP 4.7 for example still supports the old IE and gets updates. WordPress 3.0 still could’ve got patches after PHP 4 was dropped. Now we struggle with PHP 5.2 and should do the same.

Let time do the job

Admit it: Most things in our live solve themselves just by ride out. This applies to the WordPress situation too:

  1. Announce that WordPress 5.0 and higher no longer supports PHP 5.2
    and disallow people with such low PHP to upgrade to a higher WP.
  2. WP < 5.0 only gets bugfixes and security fixes which is no effort, because those will shrink over time as finding new bugs or leaks gets rare and difficult to find.
  3. WP >= 5.0 continues on the usual path but with new crazy stuff on its back.

How about that? You can drive your vintage car and still get some parts for it. Or you buy a new one and overtake the competitors. The effort for this is less than the effort to push/pull a whole crowd and all its hosting companies. Don’t tell them to clean up their room, just let them be because things are working for them.

Time will solve this. And at some point you can officially say:

PHP 5.2 has been insecure for 10 years now. U mad bro?

Keep this up for the next 5 years

Modern software like PHP, Symfony and so on have a lifetime. With the above described “IDGAF situation” WordPress can achieve this too without leaving people behind.

Every 3 years some PHP version could be dropped to close the gap to the current modern state. But the last WordPress Version before the drops will automatically become some kind of LTS (long term support) for 5 years. The effort for such LTS is low as it only supports its own frozen upper and lower boundaries of PHP.

What do you guys think?
How should WordPress do such change?
Did I miss something that might not work out?

And: If someone finds the Trac Issue then please let me know – I can’t find it right now …

All dynamic actions in WordPress

WordPress has an infinite amount of actions and filters. Indeed it comes with dynamic actions that listen on actions for your custom post type, option, plugin or other. This allows you to keep the performance and make the code easy to maintain. In this month I’ll show you some neat little tricks for them. This post starts with an overview over all possible actions and filter. Continue reading “All dynamic actions in WordPress”

Faster bootstrap with object cache in memory

When WordPress loads something, it first looks things up in its object cache. If you have posts or other permanent information that should not be loaded with every single visit, then the object cache is your performance boost. A “object-cache.php” file allows you to override the usual object cache. Continue reading “Faster bootstrap with object cache in memory”