PHP 5 is dead. It died on December 31, 2018. At the end of this month, security patches and updates will no longer be available. Hosting services everywhere are requesting that everyone update the PHP used on their account to PHP 7 . . . and the clock is ticking.
PHP 7 is the latest version of the popular programming, and it’s significantly different from PHP 5. Here’s everything you need to know about PHP 7. The good news is, PHP 7 is faster, more secure, and uses less server resources than previous versions. The bad news is, there is a chance you will need to make changes in your code as some WordPress themes and plugins being used might not be compatible with PHP 7.
Bummer. Nobody wants to do an update if it might crash their site.
There are all sorts of places on the Internet that give instructions on how to switch to PHP 7 safely. WP Engine offers excellent information, instructions, and one-on-one support if you need it.
My site, and those I design, are relatively small, blogs mostly, created in WordPress and Genesis—who both keep their code clean and up-to-date—and I only use WordPress plugins that can be swapped out if one or another has an issue.
Here’s what I did to switch myself and clients over to PHP 7 with as few issues as possible:
- Updated anything and everything calling for updates.
- Installed PHP Compatibility Checker by WP Engine. Plugin is a freebie in the WordPress Admin area under Plugins.
- Scanned my website for compatibility issues.
- Reviewed the report it generated and created a screenshot of the results. There were some warnings, and I figured the screenshot would help later. If anything was wonky after the update, I would know where to look first.
- Deactivated and deleted the PHP Compatibility Checker plugin.
- Made a full backup of the website. This was important. If the site crashed after the update, there was still time to revert back to PHP 5.
- Logged into the hosting service control panel and switched to PHP 7.
- Refreshed the website and checked to see if all was well.
- Breathed a sigh of relief.
Although upgrading from PHP 5 to PHP 7 involves carefully checking for incompatibilities, both in your code and in any extras your code depends upon, the benefits make the effort worthwhile. Hire a pro if you don’t want to chance doing it yourself.
After this month, you have no choice. Long live PHP 7.