How to update PHP in WordPress

How to update PHP in WordPress - CodeFlist

You may be familiar with the importance of updating themes, plugins, and WordPress. Likewise, having an up-to-date PHP version is good for the site. So, you should learn how to update PHP in WordPress.

The latest version of PHP ensures better speed and security than the previous versions. As a result, it increases the performance of the site. If you can make your site faster, then there is an additional advantage of being ranked higher in search engines. Furthermore, it retains the users of the site and is less vulnerable to hackers.

Before you update PHP

Before you update PHP, you should be clear about certain things. WordPress recommends for the site to have at least PHP 7.3. If your site has a lower version then you should update PHP after following these recommendations:

Have a backup of the site

If you face any problems after the update, then there is always an option to revert back to the current PHP version, if you have stored a backup. You can easily get a backup from the available free plugins from the WordPress repository.

Update WordPress, Themes and Plugins

You should always have a habit of updating things associated with WordPress from the dashboard. An updated product improves the performance and security of the site. After updating, check the site to confirm whether or not the site is performing as desired.

How to check PHP version

If you have finished updating the version of WordPress, themes, plugins, and kept a backup of the site, then you need to check the PHP version in WordPress before you proceed to update.

In this post, we will only discuss the easiest method to check the PHP version that is applicable to all the sites that use WordPress. For this, you need to open Tools>Site Health. You will see the status and Info options on the top. There are critical issues and recommended issues listed in the status. On the other hand, Info gives the related data of the site.

current PHP version
Current PHP version

Under server sub-option, you will find the current version of PHP.

How to update PHP in WordPress

If you found out that you are running an old version of PHP, then you need to update it.

How to update PHP version in Cpanel

You can see the current PHP version installed on the website once you check the “Select PHP Version” tab in the Control Panel.

Select PHP version
Select PHP version

There will be also an option to select the PHP version of your choice. You should choose the web host so that they provide the latest version of PHP. By now, you already know that the latest version helps to speed up your site and improve your site security.

How to update PHP version in WordPress
Available PHP versions

Choose the latest PHP version from the list and set it as current. In this case, I have already updated my site.

Contact Host Provider to update PHP in WordPress

There may be a control panel that does not provide an option for updating PHP. In that case, you need to contact the support team of your web host. They will either give you detailed instructions or update it on their own.

Check your Site

Take a look around your site to see if there are any undesired changes in the frontend. Go through each and every page to confirm it. In case you face any problem, it can be solved depending on the nature of the problem.

As mentioned in the beginning, if you have a backup you do not need to worry at all. This is a safe process.

Hey! Congratulations! You have upgraded your site to the latest version of PHP.

Wrapping Up

An up to date site ensures to increase speed and security. Furthermore, you already know why is it important to update PHP in WordPress. If you read this post, comment on the version of PHP that is running on your website.

And do not forget to update it now!

Additional Readings