Is it better to maintain backward compatibility with out-of-date software or to encourage users to update to more recent versions? Backward compatibility with old PHP versions keeps WordPress accessible to non-technical users who can’t update.
On the other hand, maintaining backward compatibility is a lot of work for developers and prevents them from taking advantage of new technologies. Out-of-date software is also a security threat.
The WordPress project has tended to prefer backward compatibility. In 2019, WordPress is happy to run on a version of PHP introduced more than a decade ago. With the release of WordPress version 5.1, WordPress will begin to encourage a move away from older versions of PHP, with new features that make it easier to update and that highlight when a WordPress site runs on an outdated version of PHP.
Admin Notifications of Outdated PHP Versions
WordPress 5.1 will warn admin users when their site runs on an outdated version of PHP. The site will present a notification in the dashboard that informs users of their PHP version with a link to an information page on WordPress.org. At release, the notifications will be triggered for PHP versions older than PHP 5.6. As we discussed in a recent blog post, PHP 5.6 is no longer supported, but it is the most widely used version of PHP.
The cutoff release for the notification isn’t hard-coded but provided via a new API endpoint on WordPress.org. Using an API allows the minimum version to be changed independently of the version of WordPress a site is using.
At Nexcess, PHP versions 7.2, 7.1, 7.0 & 5.6 are available to clients. Clients can change their PHP version at any time through Siteworx, their Client Portal account, or by reaching out to our support team 24/7/365.
Plugin PHP Requirements
WordPress displays a warning when users browse plugins that are incompatible with their version of WordPress. At the moment, it doesn’t display a warning when the PHP version is incompatible. In WordPress 5.1, that will change. WordPress will warn users when they look at a plugin that doesn’t support their version of PHP.
Even better, it will enforce plugin version requirements. Incompatible plugins cause a host of problems, including the “white screen of death,” so disabling the ability to install incompatible versions will prevent users from breaking their site (and reduce support requests).
White Screen of Death Protection
The white screen of death (WSOD) occurs when WordPress encounters a fatal error, often caused by plugin incompatibilities. Updating the PHP version of a site can lead to incompatibilities with older plugins and cause a WSOD. WordPress users are reluctant to risk breaking their site and possibly losing access to it altogether, so they don’t update.
WordPress 5.1 introduces WSOD Protection, which provides limited protection against errors caused by plugin incompatibilities. WSOD Protection can determine which plugin caused a fatal error and disable it in the admin interface, allowing users to access the site and fix the problem. WSOD Only works in the admin interface, because disabling plugins on the front-end can cause security and other issues.
At the time of writing, the WordPress 5.1 release candidate is available for testing. It can be installed with the Beta Tester plugin. Installing development versions of WordPress on your production site is a bad idea, but Nexcess Cloud users can quickly create a WordPress staging site for testing.