We don’t need to explain the importance of updating PHP to the latest version. Because you already know it is important, you come here to ask about how to update it, don’t you? So let’s go to the main purpose: How to update PHP version in WordPress.
How To Check PHP Version In WordPress?
Before you update to the latest PHP version available, it’s extremely important to check which version you’re currently using.
This is because updating PHP can sometimes cause incompatibility issues, especially if you haven’t updated it for a long time. It can sometimes cause plugins and themes to a malfunction or stop working on your site.
The easiest way to do check this is to go to Tools > Site Health in your WordPress dashboard. Then, click on the Info tab.
Next, scroll to the Server dropdown and see which version of PHP your site is using.
If you find that you’re using an outdated version of PHP, it’s time to fix that!
Preparation For Updating Your PHP Version
1. Take a backup of your WordPress site
Create a complete backup of your WordPress site before updating your PHP version. If anything goes wrong, you can simply restore your site back to normal. You can get a daily backup of your entire site when using the MangoWP service. We also support you restore your site with a single click and is guaranteed to work.
2. Make Updates
To ensure there are no issues while updating your PHP, always make sure your WordPress core installation is the latest. If you are running on an outdated version of WordPress and you update to the latest PHP version, it could cause incompatibility issues and render your site unusable.
3. Create a local or staging site
Set up a testing environment, whether locally or using a staging environment if your web host provides one. FYI, MangoWP supports you to clone a staging environment with one click.
Next, update the PHP on your test site and begin the process of testing for compatibility issues.
4. Check PHP compatibility
You can use a plugin called PHP compatibility Checker to check if updating your PHP can cause problems. This is a great tool for checking for incompatibility issues all the way up to PHP 7.3. There are some limitations, as some plugins are known to cause false positives. But it will give you a good start.
Error Log Monitor: This plugin adds a dashboard widget to your site that displays the latest messages from your PHP error log.
If you find any issues on your test site during this process, work to find solutions. This may include changing plugins or themes that are compatible with newer PHP versions.
Update PHP version in Cpanel (or Any Other Control Panel)
After you’ve tested everything on your local site, it’s time to update your PHP version in real life. To do this, log into your cPanel and find the section for managing PHP versions.
Click it. On the next page, you will see your website’s PHP current version. Select the option which PHP version you want to use from the drop-down menu.
If you use the MangoWP service, your site will be managed PHP version that will automatically update when needed.
Using outdated software affects your site’s security and performance. Once you have updated the PHP in your WordPress to the latest version, you can enjoy the higher speed, security, and other features that come with the newest version.
If you get any trouble while updating the PHP version on your WordPress site, feel free to reach out to our support team 24/7 for free.