It’s difficult not to cringe when we see a website running on an ancient version of PHP. Outdated software makes websites vulnerable to attacks, ensures software incompatibility issues, and means you’re missing out on better performance and other improvements.
This month (November 2019) marks a new release of PHP, version 7.4, so we thought we’d give you a rundown on why it is vital to keep PHP up to date. You can skip to the bottom for the TL;DR version; otherwise, read on to learn a little more about why this is important and how to smoothly accomplish an update.
By the way, if you have Web Care or hosting with us (we use and love Flywheel), we manage all of this for you!
PHP: What is It?
PHP is a programming language used to develop web programs and software like WordPress. PHP originally stood for Personal Home Page. Rasmus Lerdorf developed PHP in 1994 to track visits to his online resume. Today, PHP stands more aptly for Hypertext Preprocessor – it assembles the HTML5 for your website. HTML5 (Hypertext Markup Language Version 5) makes up the text and links that build the structure of web pages.
PHP powers WordPress. As a content management system (CMS), WordPress allows you to create content once, then manage it and reuse it anywhere on your website, saving time and helping maintain consistency throughout the site. We recently wrote about why WordPress is our favorite CMS.
Since PHP is a backend language, you won’t see it on the front end of a website. Behind the scenes, PHP can perform calculations, schedule blog posts, and send email alerts. It enables you to add users to your site with different levels of access. PHP makes eCommerce, eLearning, online donations, and website directories possible. These are just a few examples.
PHP Through the Years
The first official version of PHP 3.0 was released nearly 20 years ago – with 4.0 following just six months later. We are now on PHP 7.3, with 7.4 due November this year (2019).
With the release of PHP 7.0 in December 2015, the WordPress world saw drastic improvements in site load time – excellent for site users and SEO. Since PHP 7.0 has improved performance, the resources needed by the server decreased – good for wallets and the planet. Thanks to the improved Zend engine and many new functions that speed up a developer’s work, PHP 7.0 decreased the time it takes to program themes and plugins, often reducing the cost of custom development work.
The PHP development team and the vast community of supporters and contributors are thoroughly testing PHP 7.4 for release November 28, 2019. Once 7.4 is available, 7.1 will no longer receive security updates. Websites should be transitioned as soon as possible to 7.2 or higher.
What Version of PHP Do I Need?
Your site should at least be on the WordPress minimum version of PHP so that the WordPress software can be updated. Leaving WordPress out of date is a no-good, very bad idea. Right now, the WordPress minimum version is PHP 5.6, but this will likely increase to 7.0 in the next six months.
But we strongly recommend doing more than the bare minimum. Update to the latest stable version of PHP that your hosting company offers so you can take advantage of the three primary benefits:
- Better performance
- Better security
- Better compatibility with future WordPress and plugin updates.
Based on the end-of-life dates that we have, the minimum version of PHP we recommend is 7.2. If you have 7.1 after this year, your security risks increase over time.
At the time of this article, over half of WordPress websites are running on unsupported versions of PHP. Let’s talk about how to fix that so you can reap the benefits right away.
How to Update PHP
Since PHP is installed on the server that is running your website, you’ll need access to your hosting. Some hosts update it for you by request, and others provide an option in the hosting dashboard to manually change the version yourself.
WordPress has provided a handy guide to help you navigate the process. In some cases, you may not be able to go as high as the latest version of PHP, so select the newest one that you can. There are a variety of reasons why you may not be able to get the current stable version.
Sometimes the host is not ready to offer it on their server because it has not been thoroughly tested yet on their systems. If you have old legacy hosting, old server hardware may not be able to handle the performance of a newer version. If your hosting plan can’t handle PHP 7.2, consider moving to a better hosting option.
Before You Update PHP
Before you update PHP, update all your plugins and WordPress themes, make sure everything is working smoothly, and then save a backup of your site. Next, we recommend using a free plugin called PHP Compatibility Checker, which allows you to test your entire site for compatibility with the selected PHP version.
With each new version of PHP, new features are added for developers, and inefficient, insecure ones are removed. That can mean that old plugins and themes may work poorly or create vulnerabilities if their developers are not maintaining them properly. The Compatibility Checker helps you check for this in advance.
Even so, after updating PHP, you might notice a widget disappear from your site, or see a new error on the page or when you log in. There is no perfect test, and this plugin is no exception. Having a website backup before you try out the new PHP version is indispensable, as is testing your website pages and functions thoroughly after the update.
PHP makes WordPress go, and the latest update to PHP 7.4 will be available at the end of November 2019. Version 7.1 will stop receiving security support on November 30, 2019. If your site is not upgraded to 7.2 or higher by that time (or soon after), you’re missing out on speed and performance increases, risking software compatibility issues, and exposing your site to preventable bugs and security concerns.
If you have Web Care or hosting with us, we’ve already gotcha covered. If not, and you could use some professional help, we’d love for you to give us a shout!