Your WordPress site couldn’t exist without PHP. This programming language is what gives your site its functionality and ensures it’s performing as it should. Knowing your WordPress PHP version is vital if you want to improve the performance of your site.
Before we get into how to check which version your site has, let’s go through some of the basics.
PHP: A Simple Explanation
PHP, or Hypertext Preprocessor, is a server-side script language. This means the code is actioned on the website’s server and not on the site visitor’s end. This open-source programming language has been used to build some of the biggest platforms in the world, including WordPress and Facebook. In fact, most content management systems are built using PHP.
PHP is used to contact your site’s database and create readable HTML to deliver your webpages to visitors.
HTML is different to PHP in the sense that it is used to create the layout and structure of a website. It’s what enables you to place copy and media on a site to make it more visually appealing. What HTML can’t do that PHP can is perform computations. It’s what gives websites functionality.
How Your WordPress PHP Version Affects Site Performance
There are a few reasons why PHP versions are so crucial to site performance. For one, it helps save server resources by using its own memory. It also keeps a website scalable, allowing you to add more pages and functionality.
Lastly, PHP gives your WordPress site an extra layer of security, protecting it from viruses and other online threats.
Since PHP runs on your server, it directly impacts site performance, which is why you should always run the most updated version.
In the same way that theme and plugin updates are released regularly, PHP is continuously being improved too. Cleaner code and security fixes are just two examples of changes that are made.
Recommended Read: Checking Up On Your WordPress Site Security
The Latest PHP Version
PHP 5.2 was released in 2007 and was a minimum requirement for all WordPress sites. Unfortunately, there were a lot of security issues associated with this version, so if your site is still running on this, it is time for an urgent update.
PHP 7 is the latest version and it’s highly recommended that all sites be updated to PHP 7 or higher.
Consistent 64-bit support, anonymous classes, better exception hierarchy and the removal of unsupported extensions are just some of the changes that were made.
Most importantly, PHP 7 is said to be twice as fast as previous versions.
Updating your PHP version will ensure your site is fully compatible with WordPress, which will automatically enhance security and speed too.
Many WordPress site owners are still running on version 5.6 and while your site will still function, it’s best to update your version to 7 or higher as soon as you can.
Site owners often make the mistake of thinking that because they are running the latest version of WordPress they are automatically using the latest PHP version too. This is not the case – it’s your server that determines which PHP version your site uses.
How to Check Your WordPress PHP Version
There are three easy ways to check which PHP version your site is currently using:
Login to Your Hosting Control Panel
If you don’t want to touch any site files, login to your hosting control panel to check your PHP version. In most instances, the option to check your PHP version is clearly labelled under the Software section.
Once you click on Select PHP Version, you will see the version at the top of the page. This is also where you can change it.
Recommended Read: The Ultimate Guide to WordPress Hosting
View It from Your WordPress Dashboard
Once you login to your WordPress site, navigate to the Tools menu item and click on Site Health.
Not only can you view any site issues but your PHP version too. You will find this under the Info tab under the Server section. To update your PHP version, you will need to access your hosting control panel as mentioned above.
Use a PHP File
This method is quick but slightly more technical. This is only recommended if you are comfortable using an FTP client and don’t mind accessing website files. The first step would be to create a text editor file with the following code:
<?php phpinfo(); ?>
Save the file as phpversion.php.
You can now login to your preferred FTP client and upload the file to the root directory of your WordPress site (/public_html).
Next, open your preferred browser and type in your website URL followed by /phpversion.php.
You will now see a screen with details on your WordPress PHP version.
Delete the file once you are done.
A Final Word
PHP will always be an important part of your WordPress site and it’s an element that you should always be aware of. Make a point of checking up on new PHP versions to ensure your site is always running on the fastest, most secure version.
If someone else is managing your WordPress site for you, make a point of checking this information with them regularly too.