WPTavern: Yoast SEO 4.5 Urges Users to Upgrade to PHP 7
Yoast SEO 4.5 was released today with a handful of improvements and, most notably, a big push for users to upgrade to PHP 7.
“In Yoast SEO 4.5, we are urging site owners whose sites run on servers with an outdated version of PHP to update to a more recent version,” Joost de Valk said. “To move the web forward, we need to take a stand against old, slow, and unsafe software.”
WordPress’ minimum PHP requirement is still at 5.2.4, six years after PHP 5.2 reached end of life in 2011. This version is now vulnerable to many security issues. Current usage stats show 5.4% of WordPress sites are running on PHP 5.2. As this likely represents millions of users, WordPress’ core leadership is reluctant to bump the minimum requirements. Only 8% of sites are on PHP 7+, as hosting companies are slowly adding support.
“Because web hosts are not upgrading PHP, we have decided to start pushing this from within plugins,” de Valk said. He contends that the WordPress ecosystem is losing good developers because the project is moving too slowly. He also makes the case for security and speed.
“WordPress is sometimes said to be slow, but it actually doesn’t have to be slow at all,” de Valk said. “If it’s running on old versions of PHP, however, it is, most certainly, slow. PHP 5.2 is more than 100% slower than PHP 5.6, and a whopping 400% slower than PHP 7.”
De Valk decided to throw the weight of Yoast SEO, which he estimates to be 6.5 million active installs, behind the movement to push hosts to upgrade their customers to PHP 7. The latest release of the plugin displays a notice to WordPress administrators running sites on PHP 5.2, urging them to upgrade to PHP 7. The notice is “big, ugly, and non-dismissible,” de Valk said. It is generated by an error that auto-resolves when the user fixes their outdated PHP version.
“The notice will also encourage people to contact their host if they don’t know how to upgrade their PHP,” de Valk said. “Yes, this could be painful for some hosts. This notice is deliberately intended to make them work.”
De Valk said the plugin will start displaying the notices for PHP 5.2 and will add 5.6 as soon as it is no longer supported. Through experience with his customers, de Valk has found that outdated, slower versions of PHP are damaging Yoast SEO and WordPress’ reputations, as neither are optimized for PHP 5.2. Although older versions are not holding the plugin back from new features, it makes it difficult for the team to clean up the code.
“There aren’t many features I cannot build right now, but code quality is suffering because we can’t use namespaces, short array notation, etc,” de Valk said.
The Yoast SEO team has created WHIP, a WordPress package to nudge users to upgrade their software versions and made it open source for plugin and theme developers to implement in their own extensions. The project includes a filter for linking to the WordPress.org hosting page, which includes a selection of hosts that offer PHP 7.
Most of the large hosting companies already have documentation for upgrading PHP versions. Ultimately, it’s the end users who will have the power to get more hosting companies on board. De Valk said he doesn’t know how big the impact will be but encourages users to vote with their pocketbooks by leaving hosts that are unwilling to assist in upgrading PHP.
“It might be entirely possible that your host is not willing to work with you,” de Valk said. “If so, think about moving web hosts. A web host provides the engine your site runs on and that better be a damn good engine.”