Are You Ready for PHP 8.0?

  • Post category:News
Reading Time: 2 minutes

A very popular PHP 7.3 has finally reached end of life. So instead of choice between PHP 7.3 and PHP 7.4 website owners now must decide between older PHP 7.4 and newer PHP 8.0. In fact, PHP 8.1 is already available with some hosting providers.

The new major feature of PHP 8 is Just-in-Time Compiler. This makes PHP code execute much faster since it is compiled into CPU machine code and can be executed by CPU directly. Unfortunately for a typical WordPress website owner, this gives very little advantage as most of work involved in rendering website pages is tied to Input/Output – reading data from the database, loading files from disk, sending data over the network to the browser.

Right now the biggest motivation to upgrade PHP – to keep up with security threats. With PHP 7.3 and older out of support, new vulnerabilities can emerge any moment and put your website at risk. And if you are in Europe, postponing upgrade can go as far as being considered negligence under GDPR.

Compatible WordPress Themes and Plugins

Before upgrading your PHP version, it is good idea to check if themes and plugins you rely on are compatible. Below is the list of themes and plugins that we have checked:

Themes compatible with PHP 8.0:

  • Astra Pro
  • GeneratePress
  • KadenceWP
  • OceanWP

Plugins compatible with PHP 8.0:

  • All in One SEO Pack Pro
  • BetterDocs
  • Envira Gallery and Envira Gallery Pro
  • NEXTGen Gallery Pro
  • PixelYourSite Pro
  • UpdraftPlus Premium
  • WP Fluent Forms

At the same time many themes and plugins didn’t officially announce PHP 8.0 support, so it is worth exercising caution.

Testing for PHP 8.0 Compatibility

Even if it is uncertain if your website is compatible with PHP 8.0, it is very likely that upgrade from PHP 7.4 to PHP 8.0 will not cause any issues. If you feel it is time to upgrade, you can clone your website to a staging environment and test it there. Enable PHP error reporting and WordPress debug output, then try to navigate all of your web pages and test forms and any interactive elements such as WooCommerce shopping cart and checkout pages.

Recommendation

Our recommendation at the moment is to stick with PHP 7.4 for any business critical projects and schedule migration to PHP 8.0 during 2022. It goes without saying that if you rely on out of date plugin versions, you are most likely to experience issues with PHP upgrade. The first step in that case is to upgrade WordPress theme and plugins to latest versions.