PHP in WordPress, and How to Check for It

PHP in WordPress is a popular general-purpose scripting language that is especially suited to web development. It’s a powerful tool used to create dynamic and interactive web pages. In this article, we will address what PHP is, the different PHP versions, the importance PHP has to website performance, and how to check your PHP version in WordPress.

wordpress sticky note

What Does PHP Stand For?

PHP stands for “PHP: Hypertext Preprocessor.” PHP is embedded into the HTML code or used in combination with various web template systems, web content management systems, and web frameworks. 

You should use PHP for several reasons, including:

  • PHP is open-source and free.
  • There’s a short learning curve compared to other languages such as JSP and ASP.
  • There’s a large community document.
  • By default, most web hosting services support PHP, making it the most cost-effective.
  • PHP is regularly updated and keeps up with the latest technology.
  • PHP is cross-platform, meaning you can deploy your application on many different operating systems, including Windows, Linux, and Mac OS.

PHP Versions

There are several PHP versions available. We’ll discuss how they’ve changed over time and why you should upgrade to the most recent version. 

computer screens with code

Overview of PHP WordPress Versions

WordPress developers constantly release updates to fix bugs, add new features and better functionality overall. Therefore, they also improve PHP.

There are a variety of upgrades to PHP. These are usually related to performance, compatibility, and security. Some upgrade benefits include:

  • Using cleaner code that is easier to read and support.
  • Improvements for handling errors and resolving script problems.
  • Security fixes to make your site less susceptible to hackers. 

Let’s take a quick look at the previous WordPress PHP versions.

PHP 5.2

PHP 5.2 was released in 2007 and is the minimum requirement for WordPress websites. If you’re running this version, you should upgrade. PHP 5.2 has many issues, such as security issues, and most plugins don’t support this version.

PHP 5.3

PHP 5.3 was a huge step up from PHP 5.2. It is widely supported. However, developers are probably not creating products with PHP 5.3 because the code is not as clean, solid, and secure as more current versions.

PHP 5.4

Following 2014, PHP 5.4 became one of the most supported PHP versions. It had major speed improvements and used less memory. This version became popular amongst WordPress users.

PHP 5.5 and 5.6

PHP 5.5 and 5.6 are used by many WordPress users and are a step below the PHP 7 version. PHP 5.5 and 5.6 are in decent working order, and most high-quality hosts provide them. 

According to Quick Sprout, the top 10 best web hosting providers include:

  • Bluehost – Best web host for beginners
  • Dreamhost – Most affordable month-to-month plan
  • Hostgator – Best for lean/minimal needs
  • GreenGeeks – Best eco-friendly hosting 
  • SiteGround – Best for making your WordPress site speedy and secure
  • A2 Hosting – Fast and reliable shared hosting
  • InMotion – Best VPS hosting
  • WPEngine – Best managed WordPress hosting
  • Nexcess – Best for scaling and growth

Current PHP WordPress Version

It is important to update to the 7.4 PHP version or higher. Some of the benefits to upgrading include:

  • Security: Be sure you’re running a PHP version that is fully supported and checked regularly for security issues.
  • Performance: The release of 7.2 to 8.0 versions made huge improvements in performance, which should be the priority over other optimizations.
  • Support: Another key reason to keep your PHP version up to date is support. Developers of plugins and themes can only extend support back for older versions so far. Compatibility can become a problem when you’re not running the latest PHP version.
  • New features for developers: Most developers would prefer to only work on newer versions of PHP because of all the new and updated features. Unfortunately, developers are stuck having to support a range of versions.

working on computer

Checking Your PHP Version in WordPress

There are several ways to check your PHP version in WordPress. Let’s take a brief look at four different options.

1. Use the WordPress Site Health Tool.

You can use the Site Health Tool to scan for security and performance issues that may be affecting your site. Using this tool, you can also find what PHP version you’re running.

On your WordPress Dashboard, navigate to Tools > Site Health. This will perform a security and performance scan. This report is divided into two sections (Status and Info).

The Status tab gives you recommendations on how you can improve your site’s performance and security. 

You can find your PHP version under the Info tab. In the list, expand “Server” to view the PHP version.

2. Check your Hosting Control Panel.

You can also view which PHP version you’re running via your web hosting control panel. Some companies use an industry-standard cPanel. Other companies choose to use their own hosting panel. Regardless of the option, you can find the PHP version within this panel.

Login to your hosting account. Select cPanel. Then, expand the Software section. Finally, click on Select PHP Version. You’ll be able to view which PHP version you’re currently running.

3. Use a plugin.

Another option to find out which PHP version you’re running is by using the Display PHP Version plugin.

Install the plugin. Next, select Dashboard > At a Glance widget to see your PHP version. The plugin also allows you to view your MySQL, which is another key component of WordPress.

4. Create your own PHP file.

Lastly, you can create your own PHP file. This is more technical but is a good option if you don’t have access to a web hosting panel. 

Use your favorite text editor to create a phpversion.php file. Upload your phpversion.php file to your server. To do this, you can use your hosting provider’s File Manager or connect to your server via a File Transfer Protocol (FTP). 

Next, select “New Site” and assign a name to this connection. Enter your FTP credentials and click “Connect.”

Finally, in your web browser, enter your domain name followed by /phpversion.php, and your PHP version should display on the screen. Once you’ve performed this check, it’s a good idea to delete your phpversion.php file using your FTP client.

website deployment

Staying current is always better when it comes to your PHP version in WordPress. You’ll be happier when your site is secure, supported, and performing well.

FAQ:

  • What is PHP?
  • What does PHP mean?
  • Why should you upgrade to the latest PHP version?
  • How do you check your PHP version?
  • What is the current PHP version?

Contact Us Today!


Call Now