update php in wordpress

How to update PHP in WordPress 2 easy ways

Don't Hesitate to Share:

Do you want to learn how to update PHP in WordPress easily?

To improve your website performance and speed you’ll always have to use the latest version of PHP for your WordPress. If you are not using the latest version of PHP, you are hurting the loading speed of your WordPress website. Studies have shown that any website that takes more than 6 seconds to load will be deserted by 53% of people that visit it. And that’s huge! That’s why you have to learn how to update PHP in WordPress.

Updating the PHP version of your website is a definite way of increasing site load speed. Furthermore, it lessens the chances of hackers gaining access to your site. In this article, we’ll show you how to update PHP in WordPress to the latest version.

PHP and WordPress

Most beginners have a question do WordPress websites use PHP? The answer is yes, WordPress was constructed on PHP, a server-side scripting language. WordPress has passed many updates since the very first version – also has PHP. That means if you run the latest version of WordPress on an outdated PHP version, you’ll probably run into problems.

How to Update PHP in WordPress to the Latest Version- Benefits

1. Improved Security

As we know PHP is an open-source programing language. WordPress, as well, is open source. This makes them both very popular – and also possible targets for hackers. So upgrade to the latest version of PHP, to safeguard your website from hackers. For example, PHP version 5 – completely lacks security features. they aren’t safe enough to keep away a determined hacker.

2. Improved Load Speed

While there are many methods you could use to increase the load speed of your website, updating to the latest PHP version is one sure method. The most latest version of PHP is three (3) times faster than the older version.

3. Improved SEO

In Google’s rankings, one of the main factors is load speed. A faster website means a higher ranking in search results, improved user experience, and of course more sales!

What to Do Before Updating PHP

Here are a few things you have to do before updating PHP.

Backup Your Site

Before updating your WordPress, it’s always advised to create a backup. The same is applicable to updating the PHP version of your WordPress website. Here are two big reasons why creating a backup before updating to the latest PHP is very important.

  • WordPress themes and plugins are written in PHP. If any of the plugins or your theme is poorly scripted, there will be compatibility issues once the update is done.
  • There are chances that something might go wrong during the updating process. A common example is the loss of an internet connection. As small as the issue looks, it could lead to a catastrophic outcome in some cases.

Update Plugins and Themes

There are chances that your Themes & plugins might not be compatible with the current version of PHP.
To prevent this from happening, you have to update your WordPress plugins and themes to the latest versions.

To proceed, log in to your WordPress dashboard. Next, go to Dashboard >> Updates. Here, install all available updates.

how to update php in wordpress

Check PHP Compatibility

Now as you have the latest version of themes and plugins, you need to test them by using the PHP Compatibility Checker plugin. Please check the following guidelines to learn how to install WordPress plugins. 

After successfully activating the plugin, go to Tools >> PHP Compatibility. After that, select the latest version of PHP.

PHP Compatibility Scan site

You may choose to scan active plugins/themes only or scan everything. Lastly, click on the Scan site button. 

The plugin take-overs from here. It scans and identifies all the compatibility issues between PHP and all themes/plugins. 

If you face problems, you may either stop using the plugin option and search for an alternative plugin or contact the plugin developer to fix the issues it has. 

Note: At the time of creating this post, the plugin only scans up to PHP 7.3 version. But in the future, if you need to check for compatibility with PHP 8 and above versions, we recommend testing the update on a staging environment before going on a live site.

Now that you know the benefits of updating to the latest version of PHP and hopefully have a backup of your site, let’s show you how to update PHP in WordPress.

How to Update PHP in WordPress Easily to The Latest Version

How to update PHP in WordPress? There are two ways to update the PHP version of your website: 

  • From the control panel (cPanel in this example), 
  • And by contacting your host provider.

1. Update the PHP version in Cpanel (or Any Other Control Panel)

Log in to the cPanel or Control Panel of your hosting provider. From the Software section, click on MultiPHP Manager.

cPanel MultiPHP Manager - how to update PHP in WordPress

On the next page, you will see the PHP version that your web server is using.

PHP Version Check

Now, click on the PHP version option and then select the latest version from the drop-down.

PHP Version Drop-Down

Lastly, click on Apply. You are all done!

Latest PHP Version Updated

2. Contact Your Host Provider

Not all control panels have the same options. If you couldn’t find the option for updating PHP on your dashboard, contact your hosting provider. They will either do it for you or at least provide instructions.

What If the PHP Update Breaks My Site?

If you run into any errors while trying to update your PHP version, you can always restore the last backup that you’ve made. This is why we recommended you backup your website at the beginning. 

However, if the update is causing loading problems on your website, it could be due to a conflict with your theme or plugin. It happens when some of the functions on your plugin are written using an older version of PHP. 

To resolve this, you may need to troubleshoot your plugins and theme to find the convict. 

For plugins, deactivate all the plugins and check if your site comes back or not. If it works, then one of your plugins is the culprit. To find the faulty plugin, begin activating your plugins one by one. Each time, confirm whether your site is working or not. 

Now look for the plugin you activated just before your website went down is most likely the culprit. Simply deactivate the plugin and find an alternative plugin. 

After all the work, if your website is still not loading, you may have to revert back to an older PHP version for your WordPress website. After that, you can contact your hosting providers or hire a professional to help you in updating your WordPress website’s PHP version.

What Next After Updating PHP in WordPress?

Once you’re done updating your PHP, ensure you update WordPress to the latest version as well. Also, you have to update your themes and plugins to prevent compatibility issues. Finally, visit your site and confirm that everything is working properly as it should. 

The tech world is changing every day. There is a new update for something continually. WordPress and PHP, being the two most popular website resources, get regular updates that would keep your website running at its best. This is why learning how to update PHP in WordPress to the latest version is very important.

Once you’re done changing the PHP version of your site, now you can enjoy higher speed, security, and other features that come along with the latest version.

Did we miss anything? or did you have a problem understanding anything from the article “How to update PHP in WordPress”.Please let us know in the comments below, and we’ll be happy to answer them for you.

Read More:

How to Reset WordPress in Best 2 Ways

Don't Hesitate to Share:

Subscribe for the Latest Updates from Us

Join us with 40,000+ Happy Members

Sister Concern

Copyright © 2008-2022 by SmartDataSoft. All Rights Reserved.