WordPress 5.6 PHP End Life: How to Upgrade to PHP 7
WordPress Minimum PHP Increasing to 5.6
WordPress is an older piece of software, and with aging software comes a large responsibility for backward compatibility.
With the recent release of WordPress 5.2 “Jaco”, a large number of exciting changes are packed in. One of which is the new Site Health check tool. It helps educate users and developers of the essential information needed to run them correctly.
In addition to the new Site Health check tool comes the minimum PHP version increase to version 5.6.
What is PHP?
PHP is an acronym with its own recursive acronym, making it somewhat of a weird acronym. PHP stands for “PHP: Hypertext Preprocessor.”
PHP is a server-side templating engine used to create dynamic websites and is made up of PHP code and HTML code.
This is what makes WordPress so powerful. You can render extremely complicated layouts and pieces of content on the fly, as well as give the ability for user-created content. PHP is the differing factor between a static and dynamic site.
Is PHP 5.6 Still Supported?
PHP 5.6 support ended on on December 31st, 2018.
The end of the support is a reason why WordPress upped its minimum version. PHP 5.6 no longer receives feature or security updates vital to a websites health.
In fact, PHP 7.0 is also nearing its End of Life (EOL). WordPress is currently in the process of increasing the minimum PHP version to 7.0 within the next year.
What Happens if I Don’t Upgrade My PHP 5?
When a software product reaches EOL, it is no longer supported by software developers. This means, even if someone finds a security hole in the software, developers will not fix it.
With the increased PHP version being 5.6, and later 7.0, plugin and theme devlopers are using new coding standards. As plugins and themes are updated on an unsupported version of PHP, your website will more than likely break.
Since WordPress runs a large portion of the internet, it is in everybody’s best interest to keep the ecosystem safe and secure. And, as Google raises performance standards, WordPress needs to be speedy.
What are The Benefits of WordPress PHP 7?
There are many benefits to upgrading PHP versions, but the major benefit is speed and performance.
PHP 7 is twice as fast as PHP 5. What this means for your WordPress site is you can serve twice as many users for the same amount of hardware. No more reaching into your pockets for extra RAM.
PHP 7 also introduces “Engine Exceptions,” which allow developers to catch fatal errors much easier. This is a major factor in why WordPress is now introducing better error handling. This means fewer encounters with the infamous “White Screens of Death.”
How Do I Check Which PHP Version My WordPress Website is Using?
You definitely want to know what version of PHP your WordPress site is using and there are a couple ways to find out.
Check Your Hosting Management Panel
Typically you can find this information in you hosting backend. If you use software such as cPanel, or Plesk, this is easily found.
Changing PHP Versions In cPanel
- With cPanel, you can find your sites PHP version by:
- Go in the “SOFTWARE” section of the cPanel home screen
- Click “Select PHP Version”
- cPanel will display the current PHP version.
- With cPanel, you can find your sites PHP version by:
Changing PHP Versions In Plesk
- With Plesk, you will find this in “PHP Settings”. There will be a dropdown of the different PHP version available.
You should have the ability to change the PHP version here, but DO NOT DO THIS without properly auditing and backing up of your site! If you do not have an option for newer versions, contact your hosting provider to update it. If they cannot update your PHP, then it is a good time to migrate to a different hosting environment.
Use a WordPress Plugin
You can install and activate the Display PHP Version plugin, on your WordPress site if you have the ability to install plugins. After installing and activating the plugin, the PHO output is listed on the main dashboard in the “At A Glance” widget.
You should be okay for awhile if your PHP version is 7.0; however, PHP 7.0 is also at EOL. PHP 7.3 is already available and has even better performance numbers and features than PHP 7.0.
If your site is running anything less than PHP 7 then you will need to be very careful during an upgrade. We encountered, as we have upgraded clients, many instances where entire parts of plugins and themes had to be rewritten otherwise the site would not work properly. This could be your case so please follow the next steps carefully.
How Do I Upgrade My PHP Version?
1. Audit the Website
Run a compatibility check on your current plugins and themes to see if they can be used on a newer version of PHP. To run this audit is fairly straightforward, all you need to do is install and activate the PHP Compatibility Checker plugin built by WP Engine. The plugin will run a set of scans to determine what issues (if any) you will face during an upgrade. If the plugin reports a lot of issues, you may need to consult a developer to get those fixed.
A common occurrence is a plugin or theme has not been updated in a long time. These situations will require back porting compatible code to these unmaintained themes and plugins, or finding a replacement for the specific functionality they represented.
2. Back Up
After finding and addressing compatibility issues, create a backup of your site. This can be done with many different tools, and both Plesk or cPanel offer options.
3. Update PHP or Switch PHP Versions
Upgrading to a newer version of PHP can be easy if you have a good hosting provider and your site is relatively new, though older sites will have a much harder time. Many hosting providers will try to walk you through the menus and options of their hosting solution.
However, if you are left with no developer and a hosting solution such as cPanel or Plesk, updating PHP can be quite the hassle. Especially when you don’t have a backup solution or somebody in your corner to help.
What if my hosting company does not support PHP 7?
If you’ve exhausted all these options, are unable to determine the version of PHP, or cannot understand what changes need to be made, we recommend you contact a professional. We are completely biased and think you should contact us, but a google search should also help you find someone who can help.
Have More Questions About WordPress & PHP?
If you find yourself stuck, simply have a question, or want a partner to help you understand the world of WordPress and PHP, contact us today. Strategy can help!
Published in Web Development