Updating WordPress: What is “PHP” and what does it have to do with WordPress?

Image for post
Image for post

Quick intro — PHP is a programming “language” which powers a large number of websites you see on the internet. You don’t see any special “PHP powers” visibly on your browser, because everything that happens will happen on the server where your website is hosted. So, when you open your Google Chrome or Firefox browser and type in the address of your WordPress website, your browser sends the request to the server, which in turn sends your request to the “PHP engine” running there. The PHP engine gets your web page processed, and sends you back the HTML code which gets displayed on your browser.

Now, what does that have to do with WordPress?

Now, let’s talk about updates. “You should keep your WordPress website updated” — you would have heard this a hundred times if you have run a WordPress site fairly long enough. When you have a public-facing WordPress website or application on the internet, the following should always be kept up to date (which goes up in that order):

  • Your plugins and themes (software)
  • Your WordPress core files (software)
  • Your server software (PHP software, to be specific)
  • Your server’s operating system (usually Linux or Windows)
  • Your server’s hardware

Don’t be alarmed, because most of the work here is done by your web hosting provider, and any reputed ones will make sure that they are on top of this. They take care of updating the hardware and operating system, and also provide you with the latest version of PHP on your server. But it’s your job to make sure that your WordPress is making use of the latest version of PHP.

Whoa, why is that my job? I don’t know anything about PHP.

Unfortunately, there are many applications that still use the old code, and the owners have never thought of upgrading it. Some of these are monoliths that still powers entire businesses, even though they’re vulnerable to hacks. Your host can easily push the latest software from their end, but it would break these applications and it may not be an easy fix. So, in all fairness, it’s a conscious call by the hosting service providers to let the users decide.

Ok, so what should I do now?

But a word of caution — if you have got your own customizations done to the third-party plugins or themes that you use, or if your WordPress version is way old (that is, if you are currently running a very old version of WordPress), test your changes first by creating a “staging site”.

A staging site is a copy of your existing website running under a different domain or a folder. You can test your upgrades on the staging site and see if anything breaks before you attempt the upgrade on your public-facing site.

WP-Engine’s “PHP Compatibility Checker” is a great plugin to check if your plugins and themes are compatible with the latest version of PHP.

Next, the PHP version. If you have WordPress 5.2 or above and your site is using a lower version of PHP, you would usually see a notice on your WordPress dashboard — which looks something like this:

Image for post
Image for post
PHP Upgrade Notice — Wordpress

Another easy way to check your PHP version is the “Display PHP Version” plugin, which you can get from the Plugin directory (just search for “Display PHP Version” under Appearance > Plugins, and it will show up), or you can download it’s latest version from here. The only thing this plugin does is to show you the version of PHP that powers your WordPress site on your Dashboard (see image below).

Image for post
Image for post
Display PHP Version plugin: Shows your current PHP version in your WordPress Dashboard

If you see a version below 7.0, then you should look at upgrading it.

How do I get my site to use the latest PHP version?

What if I don’t see anything above 5.x?

In Closing…

Professional Software Developer, happy to help and share what I know and learn.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store