WordPress Bumps Minimum PHP Recommendation to 7.2

Late last week WordPress made major progress towards the goal of getting users to adopt newer versions of PHP. The ServeHappy API has been updated to set the minimum acceptable PHP version to 7.2, while the WordPress downloads page recommends 7.3 or newer.

Sergey Biryukov committed this change on the meta trac after Marius Jensen opened a ticket for it nine days ago. Previously, the ServeHappy dashboard widget was showing the upgrade notice to users of PHP 5.6 or lower.

“After discussing with the core Site Health team and the Hosting Team, it has come up that the most sensible next move is to show the upgrade notice to users of PHP <=7.1 (this means setting ACCEPTABLE_PHP to 7.2),” Jensen said.

“Looking at the numbers, we’re seeing roughly 25% of sites running a WordPress version that includes ServeHappy [that] would then get an upgrade notice.”

This change means that the majority of WordPress sites are using an acceptable version of PHP. Approximately 47% are running WordPress on older versions. Those who are on WordPress 5.2+ (when Site Health was introduced) will see the upgrade notices generated by the ServeHappy API.

WordPress.org stats: PHP versions in use as of June 14, 2020

This update also bumps the lowest branch of PHP which is actively supported to 7.3 and bumps the lowest branch of PHP that is receiving security updates to 7.2.

The Site Health team scheduled the change for last Friday, but Jensen noted that the API call is cached for a week in core. It should start popping up for users throughout this week.

In December 2018, PHP 5.6 and 7.0 reached End of Life (EOL) and stopped receiving security updates. This left approximately 83% of users on unsupported versions of PHP at the end of 2018. Today, with the progress encouraged by the Site Health project, 47% are on unsupported PHP versions. The update put in place last week should help significantly decrease this number before PHP 7.2 reaches EOL in November 2020.

Jenny Wong, who helped coordinate the project as part of the Site Health team, described how they got started and worked successfully across teams with design, Polyglots, and Hosting contributors to make this update possible.

“I remember going to WordCamp San Francisco and sitting down with Andrew Nacin and Mark Jaquith at lunch and asking them why WordPress supported such old versions and what the project was doing about it,” Wong said. “They told me the work that had been going on.

“They told me the issues, they took the time took explain it all to me and answer all my questions.”

Wong said she was grateful to be part of that initial discussion in 2014 and to have shared in the journey with dozens of contributors.

“To the polyglots who translated everything we threw at them, to everyone else who gave feedback, argued, fought, discussed and debated, to everyone who has shared ideas and patches, to every person who has listened to me complain, took my wild ideas and made them an reality – Thank you!” Wong said.

Given WordPress’ large share of the market, encouraging adoption of newer versions of PHP will help make the web more secure. Please note that this update means that 7.2 is now the lowest branch of PHP that is considered acceptable for use with WordPress, according to the ServeHappy API. Sites that are running on older versions may continue to work but WordPress will continue strongly urging users to upgrade.

17 responses to “WordPress Bumps Minimum PHP Recommendation to 7.2”

  1. Insane how much faster WordPress is on PHP 7.x, especially 7.3 and 7.4, compared to 5.x. Everyone should upgrade, and web hosts should nudge their customers to do it, IMO. Many web hosts have absurdly easy buttons to jump between various PHP versions.

    • Totally agree. Hosts need to do their part to help their customers stay secure (maybe some are more interested in selling malware removal?). “47% are on unsupported PHP versions” should be considered an emergency. Not even 7.1 is receiving security updates at this point. It’s great that WordPress is doing its part to keep websites safe.

  2. I’d love to check my own code against 7.4. I have the plugin from WP Engine installed but it hasn’t been updated for 11 months, which is where things fall down for us hobbyists when we need a little help.

    • I’m sure there are low price shared hosting where you can use PHP 7.4. Using an unmaintained version which is already eol (end of life) is a security risk if nothing else.

  3. WP actually recommends 7.3 not 7.4. This is definitely right step forward for WP but unfortunately it is wrong. Current latest stable version of PHP is 7.4 so the recommendation should be for 7.4, not an older version.

    Unfortunately this is just a recommendation. I wish WP would bump their minimum version to 7.2 at the very least.

    • Soon enough and that will be a great day. I wouldn’t mind seeing any version that has reached EOL trigger disablement of adding new posts, pages, etc. in order to “strongly encourage” users to upgrade, stay safe, support modern development, perform faster, etc. A lot of users see important notices and just let them pile up, which is sad because updating everything is easier than ever.

  4. Hi Justin, could you please make an article, similar that you did before, about what new PHP methods/techniques this switch enables for WP developers?

    Thank you!

    • You don’t have to wait for an article. You have a lot of articles (and now they are quite old already) and resources about new things each specific PHP version brings; 7.0 and 7.1 are already EOL (end of life), 7.2 is soon to be EOL.

      PHP 7 version is already out since 2015. There are tons of articles around the web about even what PHP 8.x will be bringing with code samples.

      Available new methods of each higher version of PHP will be the same for Magento / Drupal / Laravel / Symfony / WordPress or even bare bones PHP code as these new things are available for PHP world.

    • Say hello to expanded Type Hinting and the Null Coalescing Operator/Assignment, by far the best additions that came with PHP 7+.

  5. Can I say finally :) nah that’s perhaps a bit harsh.
    But it’s good to see WordPress trying to follow more closely when it comes to EOL version of PHP. Keep in mind it took them ages to not PHP 5.x was not a good thing to be using.

  6. Just had a long unsuccessful discussion with HostGator about this. The servers I am maintaining have 7.1 standard, with 7.2 and 7.3 only to be added via .htaccess edit, but without the ability to increase the max_execution_time of 30, which some modern themes need.
    Looks like several clients have to look for a new host.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: