How to Check Your WordPress PHP Version (3 Methods)

Become a WordPress Buff
wordpress php version
Share on twitter
Share on email
Share on facebook
Share on linkedin

If you have a WordPress site, it’s currently running PHP. In fact, it couldn’t exist without it. Considering it plays such a pivotal role in your site’s functionality, it’s important to know which PHP version you’re using.

A GIF of someone saying "It's very important!"

PHP lets you build a dynamic, fully functioning WordPress site without technical knowledge or manually editing code. However, if you’re looking to improve the overall performance of your website, it’s helpful to learn which PHP version your site currently uses and is compatible with.

In this post, we’ll discuss what PHP is, why it’s so important for your website’s performance, and the current versions available. Then we’ll walk you through how to check your PHP version in WordPress. Let’s get started!

In This Article 👁

Our team at WP Buffs helps website owners, agency partners and freelancer partners maintain their sites’ performance, run key updates, and more. Whether you need us to manage one website or support 1,000 client sites, we’ve got your back.

What Is PHP? 👩‍🏫

PHP stands for Hypertext Preprocessor. It’s the most popular server-side script language used today:

The PHP elephant logo.

In short, ‘server-side’ means that the action is taking place on the website owner’s computer, rather than that of the site visitor. So, when it comes to PHP scripts (or files), any functionality the language executes for your users happens on your end, using your server and its resources.

Although it’s primarily used for web development, PHP also serves as a general-purpose, open-source programming language. It’s powerful enough to run Facebook, the world’s largest social network, and sits at the core of WordPress, the world’s most widely used Content Management System (CMS).

How Does PHP Work?

When someone clicks on a link to your website or types in its URL, their browser contacts your site in search of your server. Your server is responsible for storing, processing, and delivering your webpages to visitors:

A chart showing the process of how PHP works.

Once the server is found, it delivers your website’s data to your visitors. Using specialized PHP code, it contacts your site’s main database (such as MySQL) where your website’s data is stored in separate parts.

From there, the main database takes your server’s request for your website, compiles it into readable HTML or HTML5 format, and sends it to your site visitor’s computer as a visible webpage.

How Does PHP Differ from HTML?

If you are not familiar with PHP, you may also be unfamiliar with the term HTML, or Hypertext Markup Language. While the two do work together to make your dynamic, ever-changing WordPress site available to visitors, it’s helpful to understand their differences.

HTML is a standard markup language that displays content on webpages to site visitors. It’s essentially the backbone of all websites and is fundamental to front end development (along with CSS and JavaScript).

HTML can be described as the basic layout and structure of your website content. It enables you to place images, text, videos, and other pieces of content together to create a visually appealing webpage. Basically, anything your site visitors can see or read on your website is presented using HTML.

However, unlike PHP, HTML cannot perform computations, such as 1+1 = 2. PHP is a server-side script language that works on the back end of your WordPress site.

As you might recall, PHP turns your website pages into a readable HTML format when a visitor requests to see your website. PHP builds upon HTML and is responsible for making your website function, especially in dynamic ways.

Why Is PHP Crucial for Your Website’s Performance? ⚡️

So far, we’ve discussed what PHP is and how it works. However, let’s take a minute to address why it’s so important to WordPress.

As the server-side programming language of WordPress, PHP is central to your site’s performance. It is used to write WordPress itself, as well as plugins and themes, and provides the functionality needed to deliver dynamic webpages to your site visitors.

There are many different ways PHP influences WordPress site performance. For example, it can:

  • Help keep your site scalable and reliable as it grows and you add more webpages.
  • Affect how fast your site is by using its own memory and saving your server resources to increase page speed.
  • Protect against viruses and threats through its built-in security layers.

PHP runs on your web server. Therefore, any issues with your PHP – which can hurt site performance – are your responsibility to fix. One of the biggest causes of errors that stem from PHP is that your site is running an outdated version.

An Overview of the Role and History of WordPress PHP Versions 📖

WordPress core, theme, and plugin developers are constantly releasing updates to fix bugs and add new features and functionality. Similarly, PHP is continuously being improved.

New iterations of PHP typically involve a variety of upgrades, often related to performance, compatibility, and security. For example, this may include:

  • Cleaner code that is easier to read and support
  • Process improvements for handling errors and resolving script problems
  • Security fixes to help make your site less susceptible to hackers

PHP has had its fair share of changes over the years. While it’s not necessary to cover its full history, knowing the basics can help you understand where the language is now.

Here’s a quick look at the WordPress PHP version timeline:

  • PHP 5.2 was released in August 2007 and is the minimum requirement for all WordPress websites. It’s full of security issues, most plugins don’t support this version, and you should definitely upgrade if you find your website is using it.
  • PHP 5.3 was a huge step up from version 5.2. While it’s still widely supported, most developers are probably not creating products with it since the code is not as clean, secure, or solid as more recent versions.
  • PHP 5.4, in response to PHP 5.3’s end-of-life in August 2014, quickly became one of the most supported PHP versions. Additionally, it boasted major speed improvements and used far less memory, making it popular amongst WordPress users.
  • PHP 5.5 and 5.6 are a step below the coveted PHP 7 and still used by many WordPress users. They’re in decent working order and provided by most high-quality hosts.

As you can see, with each PHP iteration comes some improvements to make it better than before. However, the most notable update was the release of PHP 7.

The Advantages of PHP 7

In late 2015, PHP 7 was released and touted as being the best and most optimized version to date, complete with a new version of the Zend Engine (the open source, scripting engine that executes PHP files).

It included plenty of new features such as:

  • Abstract Syntax Tree
  • Consistent 64-bit support
  • Improved Exception hierarchy
  • Removal of old and unsupported SAPIs and extensions
  • Anonymous Classes
  • Zero Cost Assets

What’s more, PHP 7 is up to twice as fast as any previous version and requires fewer resources to deliver your website to the same number of visitors. In fact, benchmark testing shows that PHP 5.6 executes one WordPress request in just under 100M CPU instructions, while PHP 7 does the same using 25M CPU instructions:

The results of a WordPress PHP version speed check.

Some of the additional PHP 7 features include:

  • Type Declarations. By assigning data types to variables, you ensure perfect outcomes. This makes your code much easier to read and is especially helpful for developers building websites from scratch.
  • Error Handling. Before PHP 7, handling script errors was nearly impossible. The new error handler anticipates, detects, and resolves issues without terminating the application. If termination of the application is necessary, it makes note of it in an error log file.
  • CSPRNG Functions. As a way to generate random data (such as passwords), PHP 7 toughens security so your site and all of its sensitive data are not as vulnerable to hackers. This is done by putting a system interface to the operating system’s random number generator for added security.

Put simply, the PHP version you’re using affects your site’s compatibility with WordPress. Upgrading to the most current version of PHP can help enhance your site’s security, speed, and overall performance and functionality.

Which Version of PHP is the Most Current? 🕰

In order for your WordPress website to function properly, your host must, at the very minimum, support PHP version 5.6.2. However, the official WordPress website will always recommend you run the highest available PHP version, which, at the time of this writing, is PHP 7.4.

As we touched on in the previous section, the most current version of PHP recommended by WordPress doesn’t necessarily mean it’s the only version used. For example, in the chart below you can see a breakdown of WordPress PHP version adoption and usage:

A pie chart breaking down WordPress PHP version usage.

As you can see, the majority of users are running PHP 7.0 or higher. However, only a chunk of them have upgraded to PHP 7.4 and even more still use PHP 5.6.

It’s worth noting that, although WordPress and PHP work in parallel, they are separate in terms of version releases and updates. In other words, just because you install the latest WordPress update doesn’t necessarily mean you’re using the most recent PHP version.

Your server determines which PHP version your WordPress site uses. Most quality hosting providers will have the current PHP version available.

However, some still use older versions as the default. The main reason for this is that new PHP versions can sometimes deprecate certain functions, which can cause compatibility issues and break older themes and plugins.

However, best practice is to always keep your themes and plugins updated. Sticking to products that receive regular updates and maintenance can translate to a more secure WordPress site. Plus, it reduces the risk of running into a PHP compatibility issue.

Free WordPress site speed eBook

Speed checklist eBook cover

How to Check Your PHP Version in WordPress (3 Possible Methods) 🔍

Since it’s critical to your WordPress website’s overall speed and performance to use the highest PHP version to date, it’s smart to run a WordPress PHP version check on your website. This will let you see which version your host is currently running and determine whether it may be time to update to a newer version.

Traditionally, using a plugin such as Display PHP Version or PHP Compatibility Checker was a popular method for performing a WordPress PHP version check. However, neither plugin has been tested with the last few WordPress releases, nor have they been updated in at least a year. Therefore, they may not be the safest options.

Fortunately, there are a handful of other methods you can use. Let’s take a look at three ways to check your PHP version in WordPress:

1. Use the WordPress Site Health Tool from Your Dashboard

The quickest and easiest way to check your PHP version in WordPress is to do so directly from your dashboard. First, navigate to Tools > Site Health:

The Site Health tool in WordPress.

On this page, you can view the health status of your WordPress site as well as any available updates or recommended improvements. If you’re using an outdated PHP version, it will be listed here. Select the Info tab:

The Site Health information in WordPress.

Next, click on the arrow to expand the Server section. This will provide you with a handful of details regarding your server setup, including your PHP version:

The WordPress server PHP version via Site Health tool.

If, for whatever reason, you’re unable to access your admin dashboard, don’t worry. There are two other methods you can use.

2. Look In Your Hosting Control Panel

Another way you can check your WordPress PHP version is through your hosting account control panel. This is a simple, safe, and quick method that doesn’t require you to touch any of your site’s files.

Every quality hosting provider will list your PHP version somewhere in your control panel. If it’s not clearly labeled, you may just need to refer to the specific documentation of your web host.

If your hosting provider uses cPanel, first log in to your hosting account and open it. Under the Software section, click on Select PHP Version:

The 'Select PHP Version' option in cPanel.

At the top of the page that opens, you can see which PHP version you’re currently using:

The current PHP version displayed in cPanel.

When you click on the dropdown button, it also presents a list of PHP versions your hosting provider supports. This is where you could go to change your PHP version as well.

3. Create and Upload a PHP File to Your WordPress Directory

If you don’t have access to cPanel or can’t locate the PHP version information from your hosting dashboard, another option is to use a PHP file. This method is a bit more technical than the previous two. However, it’s still relatively quick and easy.

First, open your computer’s text editor (such as Notepad) and create a new file named phpversion.php. Within that file, place the following line of code:

<?php phpinfo(); ?>

After you save the file, connect to your server using File Transfer Protocol (FTP) via an FTP client. You can also use your host’s File Manager.

In the root directory of your WordPress site (/public_html), upload the phpversion.php file:

A phpversion.php file uploaded to WordPress directory via File Manager.

Once the file is uploaded, you can view it in your web browser. To do that, enter yourwebsitedomain.com/phpversion.php into the address bar. (Of course, replace ‘yourwebsitedomain.com’ with your actual WordPress site URL.)

This will open a window that displays detailed information about your PHP version:

The PHP version file viewed in a web browser.

For security purposes, we recommend deleting the phpversion.php file from your directory once you’re done.

Frequently Asked Questions (FAQs) 📝

If you visit your WordPress site and everything appears to be functioning and displaying as it should, your PHP is likely working. However, if there are any issues or an update is required, you can find them listed under the Site Health tool from your WordPress dashboard.

Also, to ensure a PHP version works with your site, it’s important to check the PHP compatibility of your themes and plugins. For this, you may want to use a plugin such as PHP Compatibility Checker. Once installed, it will display errors and warnings related to your PHP version and WordPress compatibility. However, as we mentioned earlier, this plugin hasn’t been tested with the latest versions of WordPress.

The minimum PHP version that is compatible with WordPress is PHP 5.2.6. Although your host may offer this as an option, it’s not necessarily the best or safest. Other PHP versions compatible with WordPress are PHP 5.3 – 5.6 and PHP 7 and higher. WordPress recommends using PHP 7.4.

Wrapping Up 🎀

PHP is a crucial part of your WordPress website that helps it run properly and ensure efficient overall site performance. It’s highly recommended that your WordPress site runs on the latest version of PHP available, which is currently PHP 7.4.

In this post, we explained three ways you can check your WordPress PHP version:

  1. Use the WordPress Site Health tool from your dashboard.
  2. Go through your hosting control panel to view the current PHP version.
  3. Create and upload a PHP file to your WordPress site’s root directory.

A major part of keeping your site secure and compatible with new PHP versions is staying on top of your WordPress maintenance and updates. At WP Buffs, we offer Care Plans that streamline these tasks for you so it’s never a concern. Check them out today!

Want to give your feedback or join the conversation? Add your comments 🐦 on Twitter.

Share this post:
Share on twitter
Share on email
Share on facebook
Share on linkedin
Did you enjoy this post? Subscribe for more

Register for our next live WP AMA event!

🏆Chance to win weekly giveaways

📆 Instant invites to our Weekly WP AMA

🙋 First access to submit questions

💻 Direct links to all of our events

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Read about how we increased Rigorous Digital's profit margin by 23% and helped remove all website issues for MEP Publishers and their 3 complex websites.

Case study eBook cover (MEP Publishing)
No thanks, I don't need more profit and I can tackle all my WordPress issues myself.
Case study eBook cover (Rigorous Digital)

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Which care plans best fit your websites (or client sites)?

✔️ White-label site management

✔️ $1,000+ of premium plugins free under our care plans
✔️ 24/7 website edits and priority support
✔️ Ongoing speed and security optimization
✔️ 24/7 website uptime monitoring
✔️ 4x daily cloud backups
✔️ Weekly plugin, theme and core file updates
✔️ Weekly reports detailing any on-site changes

No thanks. I can manage, speed up, secure, fix and grow websites myself.
Questionnaire
No thanks. I can manage, speed up, secure, fix and grow websites myself.

Schedule a private call with our team to discuss our 24/7 WordPress care plans for serious website owners or 24/7 white-label site management for agencies and freelancers

Finally, a WordPress newsletter you'll actually read every single month.

✔️ High-impact news

✔️ Actionable tutorials and videos

✔️ #WordPress Twitter highlights

✔️ Vote on receipient of $200 donation and WP Buffs merch giveaways

✔️ Fully curated so you only receive the best 5% of content

No thanks, I have other ways to stay updated with WP

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Finally, get your website 99.9999% secure and loading in under 1 second.

Our free eBooks and easy-to-follow checklists will have your website fully optimized in just a few hours.

No thanks, my website is as fast and secure as I want it.

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

How to Sell Your Very First Care Plans Cover

Finally, an email list that helps make WordPress simple and effective for you.

Speed & security optimization tips and detailed how-to guides with advice you can implement today.

No thanks, I already know everything about WordPress.
Speed checklist eBook cover

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Case study eBook cover (Rigorous Digital)
Case study eBook cover (MEP Publishing)
How to Sell Your Very First Care Plans Cover

Honed and proven strategies we've used successfully 500+ times to help you sell your first care plans. Action steps you can implement in minutes.

No thanks, I can already sell as many care plans as I want.
How to Sell Your Very First Care Plans Cover

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

No thanks, I'm happy with my MRR

The WPMRR Virtual Summit! A free online conference 100% focused on helping you make monthly recurring revenue work for your WordPress business.

wpmrrvsblue

✔️ Attend every session and panel for free

✔️ Access to live event with all your WP friends

✔️ Free MRR merch giveaways

✔️ WP Buffs donation of $1 per registrant to Lawyers for Good Government

✔️ Make subscription revenue a core part of your business