An unofficial, read-only Hacker News reader.

Elephant in the Server Room: >50% of WordPress Sites Run PHP That's EOL by Jan (opens external site)

56 points by xadz 5 hours ago | adamgreenough.net | 15 comments on HN

Comments (13)

  1. Looks like Rocky 8 can still get you PHP 7.4 updates. And paid RHEL 7 can deliver PHP 5.4 until 2029.

    IMO it's not worth staying on versions so ancient, especially for WP and its community which is largely on PHP 8.

    Replies (2)
    1. A guy who commissioned a WP website and didn't secure a retainer, is likely to pay between 20 to 100 USD to have somebody update it. Triple that for a PHP version update.

      For many WP site owners, that is not worth doing and the site will become another malware host. Unless you have sone benevolent, trustworthy dev to recommend to them.

      Note that just two days ago, I was scolded for suggesting that an AI agent could even perform local desktop configuration, much less a server:

      https://news.ycombinator.com/item?id=50660267

      Replies (1)
      1. The model of contracting a dev to set up a website and then leaving it alone is long dead. If you can’t maintain your site you need to use a hosted platform that manages this all for you. Otherwise it will be hacked.
        Replies (2)
        1. > The model of contracting a dev to set up a website and then leaving it alone is long dead.

          A particularly dynamic site, yes.

          A static site [generator] has always worked and continues to work.

          Replies (1)
          1. There’s still a web server and operating system that may need to be patched even if you’re serving nothing but static html, unless you’re using a hosted platform as the parent says.
        2. Some may have set up the site themselves before moving on with their life.
    2. Wow. PHP 5.4. Might as well be safe again by 2029.
      Replies (1)
      1. You are not wrong. We have a server still running php 4 which missed the AI patch boat
        Replies (1)
        1. Maybe there is a market for selling a PHP 4 compatible interpreter again.
  2. I don't think websites that haven't upgraded for so long have been keeping with updates anyway
  3. Are these sites even keeping up with patches, though? Being on a supported version can help deploy a fix when forced into a corner, but if you don't have an established, regularly exercised update process, you're still in for a world of pain, as I'm sure plenty of PHP admins have found out recently.
  4. A lot of people on old servers with a lot of old PHP are only ever going to risk the smallest upgrade they can, to avoid deprecation issues in extremely old codebases.

    There's a deprecation in PHP 8.0 to do with the order of parameters with default values that will bite a lot of people.

    In PHP 8.2, they deprecated creation of dynamic properties on classes without #[AllowDynamicProperties] pragmas or __get/__set accessors. That one also messes with a fair bit of code, though it's an easy enough thing for an LLM to just add that attribute to every class.

    There's also the "left behind" tax: the older your server becomes through sheer complexity of upgrading, the more likely you are to have to compile PHP from source, which is not the nicest when you are likely to have to replace a distribution version that had a bunch of packages installed.

    I was in this position for one machine for PHPShell; I had to build the patched 7.4. I happen to know that the deprecations in 8.2 will bite me, but the old project is going to get a more considerable overhaul sooner than that, so that it is in more LLM-friendly patterns.

    Random side note: if you are revitalising an old PHP app and intend to migrate it away from PHP to another language, one sane intermediate step you might consider is reworking it to use the Slim framework ( https://www.slimframework.com ) which uses a compact form of route closure definition that is so similar to e.g. Express, Gin, the core Golang http.Handle APIs etc. that it will be a much easier task to scrutinise when you get there. LLMs seem positively giddy about the prospect. Type hints would help, too.

    Replies (1)
    1. > lot of old PHP are only ever going to risk the smallest upgrade they can, to avoid deprecation issues in extremely old codebases.

      This is becoming a rapidly dangerous mindset. The cost and risk of forking and fixing an abandoned piece of code is trending to zero and the risk of being pwned when leaving an EOL library publically exposed to the internet is trending to 100%.

      Even the cost and risk of completely removing an unmaintained library is also trending to zero.

      LLMs have a lot more patience for enumerating test-cases, automating tests and creating staging environments and magnitudes more than sysadmins have ever had.

      The case for "don't touch it don't break it" is getting increasingly indefensible.

2 comments are not loaded here. Read them on Hacker News ↗.