How to Check & Update Your PHP Version in WordPress
Do you know how to update the PHP version in WordPress?
If you run a WordPress website, you're also using PHP (Hypertext Preprocessor). And since PHP affects everything from your site's speed to its security, using an old version of PHP could hamper the overall performance of your WordPress website.
Study shows 53% of mobile users abandoned a site if it takes longer than 3 seconds to load.
In order to ensure a better user experience on your site, you must use the latest WordPress PHP version. Fortunately, it's very easy to check the current PHP version and upgrade your WordPress site to the latest one. At first, you need to take some small preparations then it requires only a few clicks for the upgrading process.
Today we'll show you how to check your current PHP version as well as how to update it from cPanel.
Let's start with the basic query of the users-
Why Update the PHP Version of Your WordPress Site
Regularly updating your WordPress site's PHP version ensures a high level of speed and security for your site. On the other hand, if you're running your site on an outdated version of PHP, it's likely to hurt your site's performance.
As you may know, your WordPress site is built on coding languages like PHP. However, you don't need to know PHP to run the website. But you have to make sure that you're running an updated PHP version. As hackers can easily exploit outdated versions of PHP to hack into your site. As a result, you can even lose your site forever or face serious damage to your reputation.
Also, you'll miss out on trendy features and functionalities of the new version that would be included considering the current demands.
You should use the latest PHP version on your WordPress site to-
- Make your site faster
- Keep WordPress site more secure
- Ensure better error handling
- Get all the new functionalities
- WordPress recommends PHP 7.3 or greater
- WooCommerce recommends PHP 7.2 or greater
Moreover, the latest version gets active support, with regular bug fixes and security patches.
Many web hosting providers give automatic updates to their customers. But if your service provider is not one of them, you can follow the manual processes.
How to Check the Current PHP Version of Your WordPress Site
Before updating your WordPress PHP version, you should check which version you're currently using.
This is extremely important as updating PHP can cause incompatibility issues, especially if you haven’t updated it for a long time. It could cause your site to break or malfunction. As a result, any of your plugins or any functions of these plugins may have stopped working correctly.
We'll show you two methods to check the current PHP version of your WordPress site-
1. Using WordPress Admin Dashboard
First login to your WordPress dashboard and navigate to the Tools → Site Health page and switch to the ‘Info’ tab.
On the Site Health page, switch to the ‘Info’ tab. Then find the Server section:
Next, click on ‘Server' to expand the tab. This section shows you server information including the PHP version used by your server:
As the screenshot shows, our demo website is using PHP version 7.4.29. Depending on which version you're running, it's your choice whether you want to upgrade or not.
2. Using Your Website cPanel
Log in to your web hosting account and go to the cPanel. Then find the section called “Software“. Here, you'll see the option ‘Select PHP Version‘.
After clicking on the option, it takes you to a new page. It shows you the PHP version your WordPress site is running on.
Alternatively, you can install a WordPress plugin to check the PHP version. We recommend you to use the plugin ‘Display PHP Version' if you face any problems with the above 2 methods.
However, we always recommend you to use the last stable release. Just because WordPress still supports your current version, it would not be a wise decision to stay on it. Below, we'll walk you through how to update the PHP version of your WordPress site.
Preparations Before Updating PHP Version of Your WordPress Site
As we've mentioned already, updating the PHP version could cause problems for your site. So, before getting started you should take care of a few things:
1. Backup Your WordPress Site (Recommended)
Before doing any major changes or updates in WordPress, you should create a backup. The same goes for updating the PHP version of your WordPress website as well.
Main benefits of creating a backup before updating to the latest PHP version:
- WordPress themes and plugins are also coded in PHP. If any of your current plugins or your theme is badly scripted, there may arise compatibility issues once you update the PHP version.
- Some unwanted interruptions can cause data loss during the updating process. For example, the loss of internet connection. This issue may look tiny but it could lead to a catastrophic outcome in some cases.
Therefore, to save your site from any unwanted complications, back up your website before making any updates.
2. Update Existing Plugins and Themes
As we've already told you, there might be some plugins including your theme that are not compatible with the latest version of PHP. You need to upgrade these plugins and the theme to the latest PHP version first.
From your WordPress admin panel go to Dashboard → Updates. Check all the available updates from here and act accordingly-
After completing these tasks, now you are ready to begin updating to the latest WordPress PHP version. Let's dive into the detailed tutorial-
How to Update PHP Version in WordPress (2 Easy Methods)
Many programming languages run in web browsers but PHP runs on your web server. This server is controlled and managed by your web host. You need to use your web hosting account for updating PHP on your web server.
Though every web hosting provider has a different way of updating PHP version, however, the process will be quite similar. We'll show you how to update using cPanel and by contacting your host provider.
Method 1: Update PHP Version From cPanel
Follow the below steps-
- Step1: Get Access to Your Website Control Panel
- Step2: Check the Current PHP Version
- Step3: Set the Current PHP Version
Step 1: Get Access to Your Website Control Panel
First, log into the control panel of your hosting provider. Find the ‘Software' tab and click on ‘Select PHP Version'. (As we've done during checking the current PHP version )
Step 2: Check the Current PHP Version
It takes you to the next page. Here, you will see the PHP version your web server is using.
Step 3: Set the Current PHP Version
Now, click on the current PHP version. It'll show you all the latest PHP versions available. Select the latest version from the drop-down.
Finally, click on ‘Set as Current'.
You've successfully upgraded your WordPress PHP!
Method 2: Contact Your Host Provider
All the control panels are not the same. If you couldn't update the PHP version yourself then contact your hosting provider about this. They will either do it for you without impacting your website or provide instructions. Some companies may charge you a fee to do this.
Below is a sample letter you can send to your hosting company:
I’m running a website on one of your servers and now I want to upgrade my PHP to the latest version. My website address is: www.example.com.
Can you please let me know if my hosting supports PHP 8.0 or higher and how I can upgrade?
Looking forward to your reply.
If you're running a WooCommerce store on an outdated and unmaintained version of PHP it causes serious damage to your business. Check the details here!
FAQs for How to Update PHP Versions in WordPress
PHP 8.1 is the latest major PHP version. It introduced new features such as Enums, Fibers, never return type, Intersection types, read-only properties, and more. The last release of the version was 8.1.5 that happened on 14 Apr 2022.
It actually depends on your web hosting provider, and how they configure their servers. To ensure the best performance for your WordPress website you must use the latest PHp version. We recommend you to contact your web host before doing any changes to your site.
Of course, you should. PHP 8 provides improved code execution performance and will expand and improve over time. Better comparisons will get rid of frequent bugs and unexpected behaviors that often plague PHP developers. Resulting Increased Speed and optimized performance.
Update to the Latest PHP Version & Run Your Website Operations Smoothly!
The main benefits of using the latest stable version of PHP are-
- The latest version is the most secure
- It's the fastest version and provides the best performance
- It's the most compatible with the latest version of WordPress
- The latest themes and plugins are written considering the latest PHP version
If you use PHP that is outdated, then your WordPress site may give errors and stop working altogether. Newer versions come with trendy features and improved code execution performance. Without upgrading your site, you stay lag behind and couldn't ensure the best user experience on your site.
If you're running a WordPress site and don't upgrade your PHP version for a while, first check your current PHP version and then upgrade it (if required) following the above steps.