PHP 8 logo

PHP 8.0 was released over a year ago. Version 8.1 released this past November. That’s right – most of us are behind on this one!

PHP 8.0 is a significant change that improves performance with a just-in-time compiler. While there’s clear benefits to making this upgrade as soon as possible, the reality today is most sites will face troubles with this upgrade. All components including theme, child theme, plugins and the libraries within each need to be adequately tested.

As of this date there is no “compatibility checker” for PHP 8.0 on WordPress like we saw for PHP 7.0 following its release in December 2015. There are some easy ways to test it out though. For starters, users of WP Engine have a button in their site dashboards to test PHP 8.0 just from their browser session alone (not to other traffic). That gets switched off by clearing cookies. There’s also staging environments (copies of your site) that various hosts provide and allow you to fully switch PHP versions. Finally, local sandbox environments support PHP 8.0.

This site and several smaller internal sites that I run were upgraded with no problems. Here’s a few issues I’ve found on other sites I’ve tested so far:

  • I embedded the Google API Client library on a site and it failed on PHP 8.0.
  • I found and reported an Elementor Pro bug when you edit a Product Archive template with PHP 8.0.
  • I found and reported a WooCommerce Orders Export plugin problem that crashes the admin Orders page.
  • PHP 8.1 deprecated notices can create a ton of notices in your logs.

Lots of sites are going to remain behind for some time. Those who have a good developer can troubleshoot and repair any problems sooner, enjoy the benefits of the latest PHP engine, and avoid the dreaded scenario of your hosting service forcing you to upgrade by a deadline.

Good luck with this major upgrade 🙂 Let me know if you need help with it.