7 days of WordPress plugins, themes & templates - for free!* Unlimited asset downloads! Start 7-Day Free Trial
Advertisement
  1. Code
  2. WordPress

How to Check Your WordPress PHP Version

Scroll to top
Read Time: 4 mins

PHP is the programming language that drives a WordPress site. Being the most fundamental part of a WordPress site, PHP greatly affects the website's security, speed, performance, and SEO ranking.

In this article, I'll explain to you what PHP is and tell you why it is important to regularly check for updates. Then I'll give you a step-by-step guide to the various ways to check for your current WordPress PHP version.

What Is PHP?

PHP, which stands for PHP: Hypertext Preprocessor, is a popular programming language used to build websites. It's specifically used to write page-related programs that run on the web server. 

Every WordPress site is primarily built on four kinds of code; these are HTML, CSS, JavaScript, and PHP. 

HTML and CSS are responsible for the look and presentation of content within the website. This includes text formatting, page layout, font selection, colours, positioning, and so on. 

JavaScript and PHP are responsible for what the website does. Common tasks performed with both JavaScript and PHP include user validation, submitting a form to the server, UI and page modifications, and so on. However, unlike PHP, JavaScript primarily runs in the web browser.

So whenever you request a WordPress site or page, there are definitely some PHP programs running in the background to generate your requested HTML. PHP files end with a .php extension. 

For example, here's an image showing some PHP programs responsible for performing specific tasks in a WordPress site:

PHP filesPHP filesPHP files
WordPress files

Most WordPress themes and plugins are primarily built with PHP. For this reason, using the right PHP version for your WordPress site is of great importance.

The Importance of Having an Up-to-Date Version of PHP

PHP has undergone so many changes and updates over the years, and this will continue in the future. Each PHP version comes with new improvements. Simply put, newer is better when it comes to PHP.

As a result of the frequent updates, using an old version of PHP on your WordPress site will leave your site vulnerable to software incompatibility, security threats, and even speed and performance-related issues. 

In fact, PHP 8 is proven to be twice as fast as any previous version of PHP. Some new syntax was also introduced to allow for cleaner PHP code.

To avoid becoming a victim of potentially devastating security breaches and code breaks, it is highly advised to check and update to a recommended version of PHP for your WordPress sites.

How to Find the Latest Available Version of PHP

The first step in the process of updating your PHP version is finding out the latest available and supported versions of PHP. For such information, go to php.net.

php.net provides a wealth of information regarding the release dates of supported PHP versions and how long they'll be supported.

Supported PHP VersionsSupported PHP VersionsSupported PHP Versions
Supported PHP Versions

To know the specific PHP requirements for WordPress, visit the WordPress requirements page. There you'll get detailed information about everything that's required to successfully run WordPress on your computer, including information on what version of PHP to install.

PHP requirements for WordPressPHP requirements for WordPressPHP requirements for WordPress
PHP requirements for WordPress

At the time of writing, a PHP version of 7.4 or higher is required to run WordPress, but that requirement will surely change in the future.

How to Check for Your Current WordPress PHP Version

There are various ways to check for the current PHP version on which your WordPress installation is running.

The quickest way to check your WordPress PHP version is to use the Site Health area, which you'll find under the Tools section in your WordPress admin panel.

After logging into your WordPress admin, go to Tools > Site Health > Info > Server. There you'll find the PHP version on which your WordPress site is currently running.

Your PHP versionYour PHP versionYour PHP version
Your PHP version

Another way to check your PHP version is with the use of a dedicated plug-in. The Display PHP version plug-in can be used to display the currently installed PHP version in the At a Glance admin dashboard widget.

To use the plug-in instead, simply go to Plugins > Add New. Under the search bar, search for Display PHP version. Click on Install, and then after installation, click on Activate.

Display PHP versionDisplay PHP versionDisplay PHP version
Display PHP version

Once activated, it will display your PHP version on the At a Glance section inside your WordPress dashboard.

At a Glance section in admin dashboardAt a Glance section in admin dashboardAt a Glance section in admin dashboard
At a Glance section in admin dashboard

If you are using a hosting manager such as Bluehost or SiteGround, you can also check your cPanel, hosting management, or site tools area to find the PHP version.

Wrapping Up

In this article, we defined what PHP is, stated its importance to WordPress, and talked about the benefits of installing an up-to-date PHP version to run your WordPress site. 

We also walked through two processes for checking for the PHP version in WordPress, using the Site Health section and the Display PHP Version plug-in respectively.

Advertisement
Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.