Websites have always run on code, but it wasn’t always the case that they used multiple programming languages. Most modern sites use languages like JavaScript and CSS for scripts and design elements – back in the day, though, websites were typically just written in HTML.
Users who load up sites with their web browsers can point to the CSS and JavaScript elements present on a site, but there’s another highly important programming language that’s running on a website’s server: PHP. If you’re loading or hosting a WordPress site, PHP is responsible for almost everything on the front and back end.
From page templates and the WordPress dashboard to the plugins and themes installed on a website, PHP is a programming language that is inextricable from the platform we call WordPress.
PHP is a popular programming language that’s mainly used to create websites. It’s an open-source language that’s free to use, just like WordPress. In light of this fact, it’s easy to see why PHP is among the most commonly used languages in web development.
For example, popular websites such as Facebook have PHP running behind the scenes. It’s also what most of WordPress core is coded with. And you can use PHP for many exciting things, such as automating your WordPress login page and managing your WordPress posts.
Unlike languages such as HTML and CSS, which dictate the style and layout of a website, PHP is responsible for what a website actually does. PHP is server-side, so it gets processed on whatever machine is using a hard drive that stores the PHP code. This differs from client-side languages, such as JavaScript, that display the work they do on a user’s internet browser.
Because PHP is a server-side language, you’ll have to tackle site performance issues related to PHP by yourself. Even if someone had the most cutting-edge computer in the world, they’d still encounter issues when loading your website if you’re dealing with PHP-related site performance problems.
PHP is inextricable from your WordPress site and its performance – it’s responsible for pulling the right data from your database, packing it up in CSS and HTML, and rendering a complete website visible from your users’ internet browsers. In other words, if PHP slows down, so does everything else.
Additionally, it’s important that you keep your WordPress site’s PHP version up to date since using old versions can compromise your site’s security to vulnerabilities and cybersecurity threats. It’s little wonder, then, that PHP as a language has been consistently iterated throughout the years, spawning a ton of versions as a result.
According to WordPress’s official recommendation, you’ll want your server to at least be running PHP 7.4 so that you can run the current version of WordPress. As PHP improves over time, it becomes much faster and more secure. Security and speed are especially important for WordPress site owners or their employees who may need to access their sites remotely through a VPN (which is common, as statistics show that 15% of people utilize a VPN daily). At the time of this article’s writing, you’ll have the greatest speed and security if you’re running PHP 8.1 on your server.
Before you jump into checking and updating your WordPress site’s PHP version, it’s important to know that active support for older PHP versions is running out. Support for version 7.4, for instance, was removed in 2020, with its security support ceasing toward the end of 2021. So, if you need other reasons to update your WordPress site’s PHP version, the lack of active and security support for older versions will hopefully convince you.
There are several options at your disposal when it comes to checking your WordPress site’s PHP version. We’ll focus on three ways to view it below.
The first and easiest way to view your PHP version is to simply log into your site and navigate to Tools > Site Health and click on the ‘Info’ tab. Then scroll down to where you see an accordion label for ‘Server’ and click to open it. Here you can quickly find your current PHP version, along with lots of other helpful information about your server, themes, plugins, and your WordPress site in general.
Another way to check your site’s PHP version is by checking your hosting management panel. If you access your hosting account and search its back end, you should be able to locate a menu named something similar to general ‘Site Information’ or ‘PHP Settings.’
For WP Engine users, this information is promptly displayed on your Sites section when you log in. You can see which version you’re using directly through these settings, and you’ll be able to upgrade to a later version through the same settings as well.
As a WordPress site owner, you have the luxury of being able to use plugins. And depending on your needs you may already be using (or want to install) an all-in-one type troubleshooting plugin like WP Tools. For this plugin specifically there is a ‘PHPINFO’ tool that will display your PHP version, server configuration, etc. Using this plugin is straightforward: simply install it and then activate it, after which you’ll be able to check what your current PHP version is via your WordPress dashboard (as well as a ton of other information).
Now, if you already happen to be running the latest PHP version on your server, you can stop here. If, however, you need to upgrade your PHP version safely, then keep reading.
Before you upgrade your PHP version, first things first.
Once you’ve created your local copy and finished backing up your site, you can also use the free PHP Compatibility Checker WordPress plugin to verify that you have no compatibility issues. Install the plugin and, once it’s installed, scan for potential errors and warnings and then update or possibly replace your incompatible themes or plugins. You can also follow the suggestions that PHP Compatibility Checker gives you.
To actually upgrade your version of PHP, log into your hosting provider’s administrator dashboard. For WP Engine users, you’ll see a warning symbol next to your PHP version if there is an update available.
Just click to open a pop-up window and proceed with your PHP upgrade. It’s that easy!
Alternatively, your admin dashboard might have a menu item called something similar to ‘PHP Version Manager,’ after which you can go to the location of your website and choose the PHP version you want to run. Certain admin panels may require you to conduct your own search to find the necessary tool with which to upgrade – in this case; you may want to contact your provider.
Note: Because PHP is used on your server, which is typically owned and managed by your hosting company, they are the ones who decide when a PHP update will be available to you. This is a good thing though since trusted WordPress hosts will test for stability and compatibility before upgrading their server PHP and enabling update options for their customers.
PHP is the thing that keeps all the pieces of your WordPress site together, and it’s essential that you keep your PHP version updated. Doing so will provide you with greater site security and speed, and if you’ve checked and upgraded your PHP version per the steps laid out in this article, your site is in perfect shape to continue into the future!
Leave a Reply