If you are trying to upgrade your wordpress site & facing a php version issue stating “You cannot update because wordpress 5.2.2 requires PHP version 5.6.20 or higher. You are running version 5.4.45”, then you are reading the right article to solve your problem. In one line, you can simply solve this by updating your site’s php version number. Below is the step by step tutorial on how to update php version of your wordpress site using cpanel.
How to update PHP version of WordPress website using Cpanel ?
1. First of all, Login to your site’s Cpanel account. The url will be something like this “yoursite.com:2083” (without quotes, replace yoursite.com with your site name)
2. Scroll down to the “Software” section & select “Multi PHP Manager”
3. In this page, you will see all your domains. Select the domain for which you want to change the php version.
Note : If you have multiple domains like me, You might see a warning like the one in the image. You can ignore this If you are about to modify the php version for all your cpanel domains.
4. Just above the domains, on the right hand side, You will see a drop down menu which lists all the available PHP versions. Click on the drop down menu, Select version 7.1 & select “APPLY”.
5. You will see a pop-up notification with green background on the top right corner of the webpage once the PHP version has been successfully updated / modified.
6. Now head back to your website & try to update the update to wordpress latest version.
I’m sure you have successfully updated to latest version. But just incase, If you have any doubts please feel free to ask in the comments section.
Always update to the latest versions, as it not only provides you bug fixes & new features, there will always a be alot of security upgrades under the hood. So stay up-to-date with the latest version, Enjoy the new features & protect your website.