Keeping your website running smoothly requires the same kind of time and attention as it does to keep a car rolling with grace and power. You’ve upgraded to top-market tires, but then the unexpected happens: a recall notice. A tiny lever somewhere in the belly of the beast is at risk. Sure, you could ignore it, but why risk it?
Consider this a recall notice for your website: A new upgrade has been released for PHP.
PHP is the most popular server-side programming language, and it’s used for all WordPress sites, plugins, and themes. Basically, without PHP, WordPress wouldn’t exist.
In the next few months, all WordPress sites will need to update to the latest version of PHP in order to avoid major security & performance issues on their website.
WordPress and PHP
Because WordPress is built on PHP, this means everything in the WordPress environment (themes, plugins, etc.) also uses PHP.
The unique thing about PHP is that it is a server-side language. This means that when we talk about PHP versions and updating a website to a new version, you have to consider the hosting server.
Similar to the WordPress core and plugins, there are new versions/updates of PHP released every few months.
Each version of PHP is fully supported for 2 years, which means during that time, any bugs and security issues are fixed and patched. After 3 years from the release of that version, there is no longer any security support for that version.
After December 31, 2018, PHP 5.6 will no longer receive security or support, which means the code will become unsecure.
Unfortunately, the majority of WordPress sites are using PHP 5.6 or a lower/outdated version.
PHP 7.2 was released in 2017 and will receive active support until the end of 2019 and security support until 2020. It’s recommended to upgrade to your WordPress site to PHP 7.2 since PHP 7.3 is still in beta right now.
Why You Should Update to a Supported PHP Version
Let’s go back to the car analogy. Top-of-the-line fuel and regular oil changes are important for the performance and longevity of your car, but you may not be aware of everything going on under the hood, until something breaks.
With cars, if a potentially dangerous flaw is identified, the manufacturer send out a recall notice to avert any problem.
In the case of a website, PHP programmers know what’s going on underneath the hood. They maintain the PHP code by releasing updates to fix weak spots & vulnerabilities.
Because PHP is used on the server level, if you ignore the PHP update, those PHP vulnerabilities and issues will affect the entire website, even if you’ve done everything you can to optimize & secure your site.
In the long run, responding to your car’s recall notice and updating your site to the latest PHP will save you a lot of time and trouble.
Prevent Security Breaches
If you aren’t using a supported and secure version of PHP, then your website could be at risk of being hacked. Because of the popularity of WordPress, it is one of the top platforms targeted by hackers. There is a major concern in the WordPress community that if a potential security vulnerability occurs in PHP 5.6, it will remain unpatched and could be exploited by hackers.
Performance Improvements with 7.2
There are also a lot of benefits once you upgrade to PHP 7.2., the latest supported version. PHP 7.2 offers potential performance improvements for page speed, in addition to greater memory efficiency on the server side.
How to Check & Update the PHP Version on WordPress
Make sure to follow these steps before upgrading your website, or you could run into major issues on the site
1. Check the Current PHP Version of Your Website
The majority of WordPress websites are using PHP 5.6 or even earlier versions.
If you aren’t sure what version of PHP your website and hosting are running on, first check with your hosting provider. The PHP version is only shown in the hosting platform. You aren’t able to see this information in your WordPress dashboard.
You can also ask your web development team to help you find this information in your hosting platform, or by installing a plugin like WP-Optimize to see information on your websites’ PHP version.
2. Test the Website with a PHP Compatibility Checker
If your website is not currently running on PHP 7.2, you’ll first need to run compatibility tests on your website.
Why do you need to test first? The first reason is that there are several features in PHP 5.6 that have been removed from 7.2. The second reason for the testing is that WordPress plugins and themes also run on PHP and there are a lot of plugins and themes that haven’t been updated to 7.2 and that are still using 5.6. If
If you skip the compatibility tests, you could have major issues or things on your website break once you update to PHP 7.2. To run the compatibility tests, install the Compatibility Checker plugin.
It’s best to have a WordPress developer install and run this test so that you don’t cause any issues on your live site. Make sure to test the website for 7.2 version. If you recall, the 7.0 PHP version will soon be ending its full security support.
Note on False Positives with Compatibility Checkers
It is possible to get false positives with the compatibility checker. It’s common for WordPress plugins or themes that are backwards compatible with older versions of PHP to be flagged with the testing tool.
We recommend having an experienced PHP developer manually check each plugin to see if the plugin isn’t compatible with PHP 7.2.
3. Fix Compatibility Issues on Your Website
For any plugin that is flagged, your developer can determine whether you can replace the plugin with an alternative option that is PHP 7 compatible. For some websites, it may be difficult to replace certain plugins. In that scenario, your development team can try to patch the plugin code to make it PHP 7.2 compatible. Somethings this is a simple change to the PHP core function calls to use the newer PHP 7.2 functions.
4. Upgrade the PHP Version to 7.2
Once you’ve completed all the testing and compatibility fixes, you can safely upgrade to the latest version of PHP. You’ll need to notify your hosting provider that you’d like to upgrade to PHP 7.2 server. This update needs to occur on the hosting platform.
The majority of hosting platforms for WordPress sites like WP Engine are requiring websites to upgrade to PHP 7.2 and moving sites to a PHP 7.2 server by a certain date. You may see different articles about upgrading to “PHP 7.” Remember that PHP 7.0 version will be ending its active support in 2018 and will not be supported past 2019, so PHP 7.2 is your best option.
After the upgrade, it’s important to do another check of your website and make sure all functionality is working well. You’ll also need to make sure only PHP 7.2 plugins are installed going forward on your website by your development team or you could have future breakage & issues.
Staying on Top of PHP Version Updates
Even though there won’t be another “recall” for a while after you upgrade to PHP 7.2, every WordPress site needs regular maintenance & security to keep it running smoothly.
After a recall notice, you wouldn’t stop taking your car in for oil changes, so don’t forget to perform monthly plugin & theme updates on your website. Ask for help from an experienced PHP WordPress development team to perform regular security updates and to install a daily database backup system.
With preventative maintenance, you can keep your WordPress site running in tip-top shape.