WordPress 5.2+ brought a lot of features to the platform including the Gutenberg which replaced the old WordPress classic interface. However, to save your WordPress site from hackers you have to pay attention to software update on the platform which includes the PHP update, plugins, and themes update. When you failed to update WordPress PHP to the latest version that matches your current WordPress version you might suffer a hacker attack that will tank your site traffic.
Another reason to update WordPress PHP is to boost performance and to increase site speed. However, if you have seen the PHP update notification that you are running a lower version of the PHP script here is how to upgrade to the PHP version that matches your WordPress site version.
Check: How to fix Grammarly not working in WordPress site
This tutorial only works for WordPress platform. Other platforms should visit their platforms forum for a guide on how to upgrade site PHP to the latest version.
Check WordPress PHP Version
If you have not updated your WordPress site PHP version in the recent time you’d probably be running a lower version. However, if you are running PHP version 7.0 you are at the risk of your site been hacked.
However, they are two ways to check the WordPress PHP version for a WordPress site and these are:
How to Check WordPress PHP Version using Plugin
The easiest approach to check a site PHP version on the WordPress platform is using a plugin and here is how:
1. Log into your WordPress site
2. Go to plugins >> Add new
3. Search for Display PHP Version, install and activate the plugin
4. Click on-screen options >> tick at a Glance
5. Click on expand “At a Glance” and you see the PHP version you are currently running.
As you can see from the above screenshot, the site used in this guide is currently updated to PHP 7.3.8 which is the latest PHP that is available for me on my host to upgrade to.
Check for WordPress PHP Version in cPanel
If you are using a control panel (cPanel) to manage your WordPress host you can as well check for your site PHP version.
1. Log into your cPanel
2. Scroll down to software >> Select PHP version
3. Wait for the PHP interface to open and check your current PHP version
The current PHP version that works perfectly with the site is the version 7.2. When I tried to upgrade to verion 7.3 it shows that they PHP version isn’t compatible with the WordPress version.
Therefore, before you move ahead to update WordPress PHP in your site it’s important to check for the PHP compatibility so that you won’t run into an error in your WordPress site.
WordPress PHP Compatibility Checker
A step by step approach to check the version of the PHP script that will work with your WordPress site. This is important as it’ll help you to know which PHP version is compatible with your WordPress version.
1. Log into your WordPress site
2. Go to Plugins >> Add new
3. Search and install “PHP Compatibility Checker”
4. Tap on the activate button to activate the PHP version checker
5. Go to Tools >> PHP Compatibility
6. Start by selecting the latest version of the PHP and choose all plugins and themes to scan for your site PHP compatibility.
7. Click on the Scan site button
8. Just hang on and let the PHP compatibility checker scan through your site for compatible PHP and make sure the results are all good.
Note: You can download the PHP checker compatibility for proper evalution after you’ve successfully updated your WordPress site PHP to the latest version that is compatible with your site.
How to Update WordPress PHP
Firstly, you need to check out the version of PHP that is best compatible with your WordPress site before you go ahead to upgrade the older version to the new release.
1. Log into your WordPress site cPanel
2. Scroll down to Software and Select PHP version
4. Select the PHP version that best compatible with your site
5. Tap on set as the current version
Now, check your site whether the PHP update notification is still showing or not. There is a possibility that your site will show error message if you site has massive traffic. However, if your site doesn’t show any error make sure you monitor it for a couple of hours to make sure everything is working fine.