How to Check and Update PHP Version WordPress

How to Check and Update PHP Version WordPress

How to Check and Update PHP Version WordPress - All websites are code-driven. It used to be all HTML, but nowadays it's usually a mix of HTML, CSS, and JavaScript.

How to Check and Update PHP Version WordPress – All websites are code-driven. It used to be all HTML, but nowadays it’s usually a mix of HTML, CSS, and JavaScript.

Also read: 20 Best HTML Web Fonts (2023)

But only after they’ve been loaded. A different programming language is most likely running the scene on the server, especially if you have a WordPress website. Of course, we’re talking about PHP.

How to Check and Update PHP Version WordPress

PHP is responsible for the majority of what you see on both the front and back ends of your WordPress site. It’s not just in your page templates; it’s also in the files that make up the WordPress dashboard.

The same goes for any themes or plugins you’ve installed. In a nutshell, your WordPress website would not exist without PHP.

Because this programming language is so important to the WordPress platform, we’d like to discuss something that many of us deal with far too infrequently: how to update your site’s PHP version.

Also read: WordPress Memory Limit: How To Fix PHP Memory Limit

What, you didn’t realize that was a part of maintaining a website? That is precisely why this post exists. It will teach you about PHP as a language and why it is important to run the most recent version, as well as how to check your site’s PHP and upgrade it safely.

Are you ready to get a little nerdy? Then let’s get right to work.

A Synopsis of PHP as a Programming Language

To make sure you understand what we’re talking about, let’s first define PHP.

To begin with, it is an open source programming language that is thus (like WordPress) free to use. This could also explain why PHP is one of the most popular web development languages. It not only powers WordPress, but it is also used by Facebook and other popular websites. However, it can also be used for other purposes.

Also read: How To Install WordPress Locally (2023)

Another important aspect of PHP is that it is a server-side programming language. That is, it is processed on the machine where the hard drive is located. This is in contrast to client-side languages such as JavaScript, where all of the work is done in the browser of the person requesting to view your site.

That also means that any issues with site performance caused by PHP are your responsibility. Your visitors’ computers could be the fastest in the world, but if your server is underutilized, it won’t make much of a difference. This brings us to the next section.

Why Should You Update Your WordPress Site’s PHP Version?

Because PHP is so important to WordPress, it also plays an important role in site performance. After all, PHP is essentially the middleman who pulls the correct data from your database, wraps it in HTML and CSS, and then delivers it to the visitor’s browser as a finished site. Everything else is slow if the middleman is slow.

PHP Updates Mean Better Results

As a result, the programming language is constantly evolving. It has gone through several iterations over the years.

PHP 5.2.4 or higher is required on your server to run WordPress. However, PHP 7.4 or higher is now the official recommendation (the current version is PHP 8).

Also read: How To Fix Installation Failed: Destination Folder Already Exists

That’s because, like WordPress, new PHP versions bring a slew of enhancements. As time goes on, the languages become more secure, faster, leaner, less resource hungry, and generally better. In fact, the upgrade from PHP 5.6 to PHP 7 was a significant step forward.

PHP 8 is the Best Version Yet

PHP 8 may not be the monster update that PHP 7.0-7.4 was, but it has a lot to offer. Sorting through all that documentation and figuring out the most important features can be challenging, so we’ve compiled it all here for you.

Though it may not be revolutionary, PHP 8 has several important features that you should be aware of. The JIT compiler expands the language’s capabilities. On a smaller scale, many developers will benefit from the new attributes, match expressions, and functions. Of course, there are union types and named arguments.

Also read: How To Use WordPress Lazy Load On Your Website

Keep an eye out for breaking changes, but this update is relatively light on major backwards-incompatible features.

An in-depth look at the newest features can be found here.

Older PHP Versions are No Longer Supported

In addition to the foregoing, the lifespan of older PHP versions is coming to an end. Version 7.4’s active support ended in December 2020. Security assistance will be provided only until December 21, 2021.

Also read: 17 Effective Ways to Speed Up WooCommerce (2023)

Still not convinced? And those are just the highlights. More awesome things have improved in PHP 8, which you can read about here. However, how do you determine which PHP version is currently in use on your site? I’m glad you inquired.

How to Check the PHP Version of Your WordPress Site

There are several ways to determine which version of PHP is currently running on your WordPress site. Let’s go over them quickly.

1. Examine Your Hosting Control Panel

Your first option is to contact your service provider. There’s probably a PHP Settings, PHP Version Manager, or something similar menu in the back end of your hosting account. You can determine which PHP version is being used by your site(s) from this page.

Also read: How To Send Emails For Free Using The Gmail SMTP Server

Most of the time, you can also upgrade to a newer version (more on that below) and edit PHP.ini. The latter is a critical file that allows you to modify server functionality.

2. Make use of a WordPress Plugin

Of course, in the WordPress ecosystem, there are plugins that can do the same thing. Display PHP Version is one of the simplest to use.

All you really need to do is install and activate the plugin. The current PHP version will then be visible in the WordPress dashboard under At a Glance.

If your server already has the latest version, all you have to do is smile and go about your business (or maybe send a box of chocolates to your provider’s sysadmins).

Also read: How To Fix WordPress Error Establishing A Database Connection

However, if you’ve never dealt with this problem before, chances are your PHP version is out of date. In that case, we’ll show you how to safely upgrade it in the following section.

Of course, this assumes that your provider allows you to switch. If not, perhaps it’s time to look for new hosting?

How to Upgrade PHP in a Safe Way

As cool as PHP 8 is, upgrading comes with some risks. This primarily means that you may have code on your site (in WordPress core, themes, plugins, and scripts) that is incompatible with the new version.

If this is the case, when you make the switch, all or parts of your site may break or behave incorrectly. That is why it is critical to check this type of thing ahead of time, as we will demonstrate below.

Also read: What Is FTP: An Introduction To FTP For Beginners

A quick reminder: the procedure outlined here is how to upgrade your live site. An even better idea is to make a local copy of your website and run it through once on your computer. This reduces the possibility of unpleasant surprises even further.

1. Make a backup of everything and keep it up to date

As previously stated, problems with upgrading PHP are typically caused by older code that is no longer compatible with the most recent version. The best solution is to update your website.

The WordPress community strongly advocates for using the most recent PHP version. As a result, core, plugin, and theme developers ensure that their work is consistent with it.

As a result, the first step in ensuring that your site does not cause problems is to keep it up to date. That is something you should do for security reasons in any case.

So, make a backup of your site and then click the upgrade button as needed. Do it right now, and I’ll wait.

2. Check for PHP Compatibility Issues Using a Plugin

Done? Okay, then let’s move on.

Even with the most recent WordPress and extensions, there is no guarantee that everything will go as planned. Fortunately, you don’t have to just hope for the best. Instead, you can check for incompatibility issues ahead of time. How? Of course, with a plugin.


WP Engine has made a free plugin available in the WordPress directory for this purpose. It examines all of the code on your website and reports any potential problems.

To use the PHP compatibility plugin, you must first install it on your site as usual. When it is enabled, a new menu item called PHP Compatibility will appear under Tools. Simply select the PHP version to which you want to upgrade. Then, specify whether you want to scan only your active plugins and themes or all extensions on your site.

Begin the scan. When finished, the plugin will display a list of errors and warnings for your site. It will even tell you what file and line number it encountered.

From here, you can either replace faulty plugins or themes or seek a different type of solution (such as asking the developer to update their work). The plugin will also make recommendations.

By the way, if you have an up-to-date plugin that is still flagged as incompatible, it could be a false positive. When there are no compatibility issues, WP Engine provides a list of plugins known to be flagged. Take that into consideration.

3. Upgrade Your PHP Version

It’s time to make the switch now that you’ve confirmed that your site can handle it by all accounts.

There are several approaches to this. One method is to use SSH commands. If you already know how to do this, you’re probably not reading this. As a result, we won’t go over it. If you still want to learn how to upgrade your server’s PHP version via SSH, click here.

Also read: 8 Easy Ways To Fix 403 Forbidden Error

We’ll take the easier route and update your WordPress PHP version through your hosting provider’s admin dashboard. In cPanel, for example (which is also based on PHP), it’s as simple as finding the menu item PHP Version Manager, navigating to your site’s location, selecting the version you want to change to, and clicking Save.

If your host uses Plesk, you can learn how to upgrade PHP here. Unfortunately, you will have to conduct your own search for other admin panels. If you cannot find such an option, your host may have disabled it. In that case, you should contact your service provider.

4. Examine Your Website

After you’ve upgraded, the last thing you should do is return to your site’s front end and take a look around. Examine each page to ensure that everything is in order and that no parts of your site are disabled or similar. Also, test the plugins and theme features you’re using. However, if you followed the precautions outlined above, it is highly unlikely that there was a problem.

That’s the end of it. Congratulations! You have just upgraded PHP for your WordPress site.


PHP is what holds WordPress together. As a result, it’s critical to keep it up to date. You will also benefit from increased speed and security.

Also read: 11 Ways to Fix the DNS Server Not Responding Error

You have now learned about PHP and why it is critical to upgrade. We discussed how to determine which version of your site is running and how to prepare it for updating. Furthermore, we have instructed you on how to carry out the upgrade through your hosting control panel.

Congratulations if you’ve been following along! Your website is now future-ready. Check out our developers’ guide to PHP coding standards to learn more about PHP.

The WordPress Learning Hub

Related Posts