Local Beta 5.9.7 has PHP 8… and the latest version of WordPress (mostly) supports it!
It’s a good question, and the process isn’t easy due to so many breaking changes. The main reason is the significant performance improvements related to the just-in-time compilation. Some benchmark tests show improvements of almost 3 times as fast!
Beyond the performance improvements, there are many changes to the language that make it easier to write fast, bug-free code.
One specific example is that many PHP notices will now be warnings. While you might initially think this is a bad thing – the benefit is that these warnings are more informative and allow developers to find and fix issues early in the process!
To get a better idea of all the PHP language changes viewed through a WordPress lens, look at the “Changes in PHP 8” section of the WordPress and PHP 8.0 post of the core make blog.
Yes! Sort of…
Because PHP 8 has several breaking changes, the WordPress core developers have introduced a concept of WordPress being “Beta Compatible” with PHP 8.
This means that the most recent WordPress versions (
5.6 and later) are compatible, but given the large ecosystem of Plugins and Themes, “WordPress” isn’t 100% compatible.
Again the WordPress and PHP 8.0 post on the core make blog does a great job of highlighting what being “PHP 8 Compatible” means, so definitely take a look!
Okay, so WordPress core’s compatibility with PHP 8 is in a pretty good state – how do I test my site to see if it works with this new version of PHP?
Since WordPress is only “Beta Compatible”, PHP 7 is still the default version used for Preferred environments.
That being said, the latest beta version of Local allows you to select PHP 8 for custom environments. You also can change the PHP version of existing sites from the site details page.
While testing a site under PHP 8, it’s important to remember a couple of things:
Basically, take a backup of your site, update everything to their latest version, and see if anything breaks!
You’re not wrong that a lot is going on and that PHP 8 breaks a number of things.
If you’re wanting to get a high-level look at what you’re getting into, one of the best case studies I’ve seen was published by Yoast, where they reviewed what it took to get
yoast.com to be compatible with PHP 8:
So yeah, if you’re overwhelmed, you’re not alone – but updating to the latest version of PHP 8 doesn’t have to happen right now. If you’re not as technical and afraid of breaking things, you can wait a bit before diving in.
Users who are more technical or are maintaining plugins or themes, see the resources section for some tools that can help with this process!
Either way, when using Local, it’s easy to export your site to have a backup. Using that backup, you can import it into as many new PHP 8 environments as you like! Anything you break in these sandboxes can be deleted without breaking things on your live site!
It’s free and always will be.
Thanks! We'll contact you as soon as Local for Windows is available.
Next-level functionality and enhanced local development.
Sign up below and we’ll notify you the minute Local Pro is available for beta! Launching July 2019.
Thanks! We'll contact you as soon as the beta is available.
Local is only available as a desktop application, but no worries! Just enter your email in the box below and we'll send you a little reminder to download it via your desktop.
Thanks! Check your inbox for a link to download Local on your desktop.