WordPress is written in a programming language called PHP. This allows content to be saved and read from the database, pulls in different files and just makes your site run as it should.
WordPress recommend PHP version 7.4 or greater, but according to WordPress stats page 83.6% of WordPress sites are using PHP 7.0 or below.
And 37.4% are using PHP 5.6, which is about to be completely unsupported. Not. Good.
The latest version PHP 8.0 has just been released. WordPress aims to be compatible with PHP 8.0 in the 5.6 update, which is currently scheduled for release on December 8, 2020. However, your themes and plugins may not be compatible. Keep an eye on what installed plugins and themes on your site are being updated for compatibility. And test your site before upgrading to PHP 8.
It’s time to upgrade your PHP version
PHP 5.X is about to reach end-of-life and will stop receiving all updates by the end of 2018. What does end-of-life mean? If there’s a security issue, the developers will not fix it. So if your site still uses version 5.6 or older in 2019, your site is vulnerable to being exploited and hacked.
- PHP 5.6 ended active updates on 19 Jan 2017 and will not receive security updates after 31 Dec 2018
- PHP 7.0 ended active updates on 3 Dec 2017 and will not receive security updates after 3 Dec 2018
- PHP 7.1 ended active updates on 1 Dec 2018 and will receive security updates until 1 Dec 2019
- PHP 7.2 will receive active updates until 30 Nov 2019 and security updates until 30 Nov 2020
PHP 7 has many improvements to do with performance, bug fixes, memory usage, modern programming structures, active support and more. So using an up-to-date version will mean your site can run faster, be more stable, use resources more efficiently and be more protected. Which is obviously very important!
How to check what PHP version you’re running on?
Want a simply way? You can install the Display PHP Version plugin, which will display the version number in the “At a Glance” widget on your WordPress admin dashboard. You can also check by logging into your web host provider, under PHP info or settings in the cpanel.
Using the Wordfence security plugin? Go to Wordfence > Tools > Diagnostics > PHP Environment.
Have FTP access? Create a file, add
<?php phpinfo(); and save it as
myphpinfo.php (ideally use a more secure name). Upload it to your web root directory and then visit the file in your web browser. Delete this file once you’re done.
How to update your PHP version for WordPress?
Ideally you should update to 7.2 to meet WordPress requirements. At the very least, you should upgrade to PHP 7.1. You can do this within your web host panel, choose which version your want to update to usually under PHP settings, PHP Version Manager or something similar. If you’re not sure you can contact your web host or developer who should be able to do this for you.
WordPress core is fully compatible with 7.2, but some themes and plugins may cause some compatibility issues. This is more likely if changing from 5.X to 7.2 due to the updates in code.
If you’re using an outdated plugin, it is best to deactivate and uninstall. If the plugin has been regularly updated but you notice a compatibility error then reach out to the plugin developer. Similarly you may need to contact your theme developer to make some updates. This migration guide and depreciated features list may be helpful. I’m also available to hire if needed – details about my Consult and Code service here.
Always back-up your full site before doing updates. You may want to test your site on a server running PHP 7.2 before updating your live site.
You could also use PHP Compatibility Checker and Error Log Monitor plugins. Most web hosts offer a simply PHP version change in the CPanel, so if you switch to PHP 7 and notice problems you can switch back until the issues are fixed.
PHP is the glue that holds your WordPress site together and makes it work properly. It’s important to keep it up to date for increased speed and security. Remember you have until the end of December 2018 to upgrade to at least PHP 7.1. Need some help? Feel free to send me an email and I’ll help anyway I can.
This is a very informative article about php version upgradation. This is very helpful article for us.