How to Check and Update WordPress PHP Version

Do you wonder How to Check and Update PHP Version in WordPress? This is your one-stop guide to PHP versions and updates.

WordPress was developed using the PHP programming language. It gets regular updates, which enhance its functionalities and security.

So, website owners and developers must always use the latest PHP version on their sites.

This blog will show you different ways to check your website’s PHP version. We’ll also walk you through the steps to update PHP to the latest version.

Let’s get started.

What Is PHP?

PHP, short for Hypertext Preprocessor, is an open-source scripting language for web development. The language is mainly used for server-side scripting, i.e., it runs on the website’s hosting server.

The PHP code is stored on servers in files with a .php extension. These files are programs that power the WordPress content management system.

Overview of WordPress and PHP

PHP was introduced in 1994 to facilitate web development. The WordPress CMS program is written in PHP. Besides PHP, WordPress also uses HTML, CSS, and JavaScript.

HTML and CSS are used for website design and customization, such as page layout, typography, etc. PHP and JavaScript, on the other hand, are responsible for the site’s functioning, be it validating a user, form submission, etc.

Here’s a simple example to help you understand how PHP works in WordPress.

When users visit your site, their browser sends requests to your server. The server then runs the PHP code to find relevant assets in your database to generate the requested HTML page.

Finally, the server sends the page to the user’s browser, displaying all the relevant information.

While PHP is an important component of the WordPress core, it is also used to develop plugins and themes. As a result, installing the latest PHP version becomes essential to avoid incompatibility issues.

How to Check PHP Version in WordPress?

Over the years, PHP has been updated several times to improve its overall functionality.

WordPress recommends developers use PHP 7.4 or a newer version for a smooth experience. The latest version, i.e., PHP 8.2, was released in December 2022.

So, which PHP version does your website run? There are two ways to find out.

1. Use the WordPress Site Health Tool

You can find your website’s PHP version from the WordPress admin dashboard. Log in to WordPress, head to the side menu, and click Tools > Site Health.

Site Health
How to Check and Update WordPress PHP Version 15

Now, you’ll see two tabs on your screen – Status and Info. Navigate to the Info tab and expand the section named Server. There, you can find the PHP version with other information about server names, architecture, etc.

server architecture
How to Check and Update WordPress PHP Version 16

2. Use the Hosting Control Panel

You can also check your site’s PHP version using your hosting provider’s control panel. The following steps are for the cPanel server management interface.

Log in to your hosting account, and click the Select PHP Version option under the Software section.

select php version
How to Check and Update WordPress PHP Version 17

Source

Your site’s current PHP version will be displayed under the PHP Extensions section.

PHP
How to Check and Update WordPress PHP Version 18

Source

How to Update PHP Version in WordPress?

Once you have checked your PHP version, the next step is to update it to the latest version. You can do that from your hosting control panel.

But first, let’s see why you must install the latest PHP version on your server.

Why Should You Update the PHP Version of the WordPress Site?

PHP is at the core of any WordPress website. So, any issues in PHP can severely impact your site’s performance and hinder its security.

Here’s how updates help.

1. Performance Improvements: With each update, developers implement cleaner code, which is easier and quicker for the server to execute. Any errors or bugs are also fixed. So, your server executes requests faster, and your website loads quickly on users’ devices.

2. Server Resource Usage: Server resources are limited. However, older PHPs didn’t have clean codes. So, every request took considerable processing power to execute. A benchmark revealed that PHP 7 takes 25 million CPU instructions to execute a request, while PHP 5.6 takes 100 million CPU instructions to execute the same request.

3. Security Updates: Newer versions also have security patches based on the latest threat definitions. PHP 5.2 was known to have severe security issues. However, with each new update, developers have patched vulnerabilities over time.

4. Compatibility: PHP is also used to develop WordPress themes and plugins. While you can continue to use the same PHP version, theme and plugin developers may adopt the newer version. As a result, their more recent updates may not work with your website.

5. Obsolescence: Developers only support each PHP version for three years. In the first two years, they get bug fixes and patches at regular intervals. The last year is only for patching any critical issues. So, you won’t receive new updates if you use a PHP version beyond the supported period.

Looking for ways to secure your website? Check out these top 5 WordPress security plugins.

Now, let’s see how to install the latest PHP version using different web hosting control panels.

Update the PHP version in cPanel

If your server uses the cPanel server management interface, you must log in to your cPanel and click Select PHP Version under the Software section.

Select PHP Version under the Software
How to Check and Update WordPress PHP Version 19

Source

Select the site/s where you want to install the new PHP version. Then, select a newer PHP version to install from the drop-down menu.

PHP selector
How to Check and Update WordPress PHP Version 20

Source

Click Apply. A new PHP version will be installed on your site.

Update the PHP version in Kinsta

If you use Kinsta hosting, first navigate to the Sites tab in the menu on the left side of your account’s dashboard. Then, select the site where you want to install the new PHP version.

Click the Tools tab. Look for the Modify button under the PHP Engine section. Click it and select a PHP version from the list.

Tools
How to Check and Update WordPress PHP Version 21

Source

A confirmation dialog box will open. Click the Modify PHP Version button to start the update.

Modify PHP Version
How to Check and Update WordPress PHP Version 22

Source

Update the PHP version in SiteGround

On SiteGround, the process is similar, but you can pick between Ultrafast PHP and regular PHP. The Ultrafast PHP includes some performance boosters from SiteGround.

First, open the Website tab and access Site Tools for the desired website.

Site Tools 1 1
How to Check and Update WordPress PHP Version 23

Source

Then, navigate to Devs > PHP Manager from the column on the left. Click the Change PHP Version under the Manage PHP Settings section.

Manage PHP Settings
How to Check and Update WordPress PHP Version 24

Source

A pop-up will open, where you must pick the Change PHP Version Manually option from the Set PHP Version drop-down menu. Next, select the PHP version and click Confirm.

Change PHP version
How to Check and Update WordPress PHP Version 25

Source

Update the PHP version in the WP Engine

Unlike the other three options, WP Engine is a managed hosting provider. So, the latest PHP version will be installed automatically when it becomes available.

However, you still have the option to upgrade or even downgrade manually.

To change the PHP version, log in to your WP Engine account and open the Overview tab. Click the PHP version in the Updates section.

php selector 1500x555 1 1024x379 1
How to Check and Update WordPress PHP Version 26

Source

Select whether you want to upgrade or downgrade the PHP version in the pop-up dialog. Finally, click the Change PHP Version button.

choose php version
How to Check and Update WordPress PHP Version 27

Source

What to Do After Updating Your WordPress PHP Version?

After you’ve installed the latest PHP version, your website should work flawlessly. However, in rare cases, the latest update may introduce incompatibility issues or break your site.

So, you must also take some additional measures to ensure your site works smoothly after the update.

  • Test if all the functions on your site’s front end work without issue.
  • Check the compatibility of installed themes and plugins.
  • Update your themes and plugins to the latest version.
  • Do a before and after test of your site’s performance to see any slowdown after updating.
  • Perform a security audit to catch any vulnerability introduced by the new version.

If you find an issue, you can downgrade to the previous PHP version and see if it fixes problems. Or you can troubleshoot the issue by yourself.

Start by deactivating all plugins and switching to the default theme. Then, you can reactivate them individually and test your site to identify which component caused the problem.

If you can’t troubleshoot, you must readily contact your hosting provider for assistance.

Besides these post-update measures, it is a good practice to back your site up before updating the PHP version. In case a PHP update breaks your site, you can restore your backed-up site.

Also, do not install updates directly to your live site without testing. You must create a staging environment and update PHP within it. If everything works fine, you can install the new PHP version on your main site.

Wrapping Up

Updating the PHP version of WordPress should be an important step in your website maintenance process. It not only improves the site’s performance but ensures there are no incompatibility issues and vulnerabilities.

While the latest WordPress has support for slightly older PHP versions, it is advised that you always install the newest version. Also, upgrade your plugins and themes after updating the PHP version.

Just like the latest PHP ensures your website functions smoothly, The Plus Blocks for Gutenberg improves the default WordPress block editor.

For just $39/year, The Plus Blocks gives you access to over 85+ advanced WordPress blocks and 300+ prebuilt UI blocks and templates.


The Plus Blocks for Gutenberg
How to Check and Update WordPress PHP Version 28

Check the entire list of 85+ Blocks Library from The Plus Blocks

Not only that. You also get advanced features like Blog Builder, WooCommerce Builder, Mega Menu, and more.

Download The Plus Blocks for Gutenberg today!

FAQs on Checking WordPress PHP Version

Is it safe to update PHP?

Yes, it is safe to update the PHP version as long as you install it from a trusted source like your hosting provider. Rarely, updates may introduce incompatibility issues with preinstalled plugins and themes. So, always test new PHP in a staging environment before installing it on your main site.

Which PHP version is compatible with WordPress?

At present, WordPress supports PHP 7.4 or newer. You can check the detailed combability status on WordPress.org.

How do I find my WordPress PHP version?

From the WordPress admin dashboard, head over to the navigation menu and click u003cemu003eTools u003e Site Healthu003c/emu003e. Then, navigate to the u003cemu003eInfo u003c/emu003etab and expand the u003cemu003eServer u003c/emu003esection. There, you can find your site’s PHP version.

What is the minimum PHP version for WordPress?

The latest WordPress version requires PHP 7.4 or higher to run smoothly.

How can I check my PHP version?

To check your PHP version, open the u003cemu003eSite Healthu003c/emu003e section from the WordPress dashboard. Then, head over to the u003cemu003eInfo u003c/emu003etab and click the u003cemu003eServer u003c/emu003eoption, and you’ll see a row with the PHP version.

How do I update my PHP version in WordPress?

You must use your hosting control panel to update your WordPress site’s PHP version. For cPanel, you can update PHP from the Select PHP Version option under the Software section. See the complete steps on our blog.

What happens if I have an outdated PHP version on my WordPress site?

An outdated PHP version can hinder your site’s performance. That’s because most of your plugins and themes probably use a newer PHP, which causes incompatibility issues. Besides, outdated versions do not get the latest security patches, leaving your website vulnerable to cyberattacks.

Get Free 25+ Secrets to Make WordPress Website Faster [Guaranteed Results]

    Subscribe to our YouTube Channel for Elementor Tutorials

    Automatically Convert Figma Designs to 100% Editable WordPress Website

    Have Feedback or Questions?

    Join our WordPress Community on Facebook!