Upgrade PHP version in hosting cPanel is one of the factors that help improve the website. Currently PHP has versions like version 7 and the latest version has been upgraded to Version 8. Version 7 is being used a lot, but many websites using WordPress have upgraded to it. Version 8 to improve speed. This is a pretty simple tip, but we use it often because some vendors leave the default PHP version not too high to be suitable for all websites. However, the provider allows users to upgrade the PHP version if they want to use it for their website.
In this article, IMTA I will show you how to upgrade the php version for WordPress websites, for websites hosted on hosting using cPanel. This is one of the actions that WordPress users need to perform, to ensure the best possible performance and website security.
Table of Contents
Why do you need to upgrade the php version for your WordPress website?
Usually, you do engineering, understand a lot about websites and want to optimize speed to increase processing performance to help improve website speed and also to increase website SEO factors. In addition, it also helps us in website security issues.
Because the default PHP version is often behind the “age”
To ensure all websites are working properly, hosting service providers there is a tendency to set the default PHP version which is quite outdated compared to the current one. Eg WordPress recommends users to use WordPress 7.4 Many years ago, the default php version that the hosting service providers still kept was at php 7.0 or 7.2.
You know, not every website is cared for and updated with regular source code. There are websites that are outdated in terms of source code. Therefore, if you leave the default high version, those outdated websites will not work. That’s why Vietnam & World hosting service providers accept low versions so that all websites can be responsive. The customer’s website needs to upgrade php, they can do it themselves through instructions like this article of IMTA, for example.
Below are statistics on the percentage of websites using php versions at the present time (07/2021) for your reference. Looking at the statistics you will see that there are many websites that are using an outdated version of php and that may include your website.

What are the benefits of upgrading the php version for a WordPress website?
As at the beginning of the article, I also briefly talked about the effect of upgrading the php version for WordPress websites, which is to optimize website performance and security. And below I will give more details for you to imagine.
- WordPress is a CMS built based on the PHP programming language and database management system MySQL. Hackers mainly exploit the security hole of PHP to attack the website. Therefore, php is very focused on upgrading and fixing security errors. If you let the website run at a low php version with many security holes, it will not be safe.
- Not only security upgrades, the new version of php also improves gradually to improve the performance of the website. Webpage Faster loading, performing operations is also smoother, smoother.
- In addition, the new php version also helps to optimize the work efficiency of WordPress developers. This is mainly WordPress developers / programmers they are interested in, so I don’t go into it.
Should I upgrade to the latest PHP version?
Definitely not, you should just upgrade to the version recommended by WordPress. Although you see WordPress saying this source code has worked fine on the latest php version 8.0 for example. But that’s just the WordPress source code, your themes and website plugins may not have been updated to the new php version. Therefore, when upgrading to the highest version of php, your website is most likely will get an error and won’t work.
Therefore, WordPress can warn users about outdated themes and plugins for you to decide whether to install or not. Of course there are plugins that are outdated but still work well, but not all of them are fine. Therefore, you should also be very careful when installing outdated plugins!
As such, my recommendation is: First, upgrade to the new php version suggested by WordPress. Second, with that version of php, your website must work properly, without any errors, to upgrade. If an error occurs, you should be able to roll back to the old version.
How to upgrade php version in cPanel
Job upgrade PHP version for WordPress website pretty simple. But with the condition that you must have admin rights to host that website. Because we are going to upgrade the php version in the hosting admin page. In the framework of this article, I will guide you to do it on hosting using cPanel because it’s the most popular.
At the time of writing this article, the php version recommended by WordPress is 7.4 (July 2021). However, in the future the optimal version of php for WordPress may be higher, for example, php 8.0. Below is an example of a recommendation to upgrade the php version of WordPress for my demo website. Note that you should also backup your website before upgrading to ensure the safety of your data.

Upgrading the PHP version for a WordPress website in cPanel is very simple. You just need to follow the steps below in sequence.
Step 01: Log in to the cPanel admin page of the hosting you are using. Next find and open the item MultiPHP Manager as shown below.

Step 02: Tick select the domain name to upgrade the php version. In case your host shares many domains, if you want to upgrade php for any domain name you tick on that domain name as shown below. Next is to click on the red circled area to select the php version to upgrade.

Step 03: At the present time (July 2021), the PHP version is the most optimal for WordPress websites. You choose the php version 7.4 then click the button Apply To confirm.

After clicking Apply, the result will be as shown below. That means you have successfully upgraded the php version for your WordPress website.

Now, when you go to the WordPress website admin page, there will be no warning asking to upgrade php like before.
However, in case your website after upgrading the php version leads to errors, inoperability or slowness, please return to the php version as before the upgrade.
Frequently asked questions
In general, upgrading the php version for a WordPress website done in cPanel is quite simple. However, questions will not be avoided. Below I will quickly answer some frequently asked questions related to upgrading the php version for WordPress websites for your reference.
EPILOGUE
That’s it, IMTA has completed instructing you how to upgrade the php version for your WordPress website. This is one of the operations to focus on in optimizing and securing WordPress websites. You can find more tips on securing and optimizing your WordPress website by following the suggested links below.
Finally, if you have any questions during practice, you can leave a comment below. We will respond to you as soon as possible, thank you. Hello and see you in the following articles at IMTA.EDU.VN