Speed Up WordPress by updating your PHP Version

Every website runs on code; once it used to be only HTML, now it’s a mixture of HTML, CSS, and JavaScript. But that is only when the website is loaded.

Before that, on the server, there is another, different programming language, particularly on WordPress sites, and it’s called PHP.

PHP is responsible for pretty much everything you on the front and back-ends of your WordPress site – in themes, plugins, files, so much that, without it, your WordPress site simply wouldn’t exist.

Because PHP is so important, it is critical to the performance and speed of your website that you keep PHP updated and always have the most current version running.

Because PHP is a server-side language, it is down to you to fix any PHP issues that arise – your website visitors may be using the fastest computers in the world but if your server is running out of resources it’s going to slow everything down.

Why You Need to Update PHP

As well as being a critical part of WordPress, it is also a central point of your website performance. In short, PHP is the man in the middle who gets the right data from your site, cocoons it in CSS and HTML and then delivers it to the browser of your visitor.

If the middleman slows down, so does everything else.

It is for that reason that PHP is always undergoing improvement and, right now, we are on version 7.1. Like any update, each new one brings security fixes and new features.

As it progresses, PHP gets faster, more secure, and uses fewer resources. PHP 7 has been shown in benchmark tests to be more than twice as fast as the previous version and that can only be a good thing for your website. Your server can deliver your content quicker, without having so much work to do and it is far better at error handling.

Check Your Version

Checking your PHP version is simple:

  1. Go to your WordPress hosting account and look for the PHP menus – it will be on the backend.
  2. It will be called something like PHP Version Manager or PHP Settings and here you can see what version you are running
  3. Depending on which host you are using, you may also be able to upgrade it from here but don’t do that just yet.

Upgrading Safely

It isn’t always straightforward to upgrade to PHP 7. This is mostly down to the fact that you may have code somewhere on your site that isn’t fully compatible with PHP 7 and this, in turn, means that your site may not function correctly afterward.

The following shows you how to update a live site, but you could create a copy first and try it on that, so you are prepared for anything that might happen:

Back Up and Update

Basically, upgrade your website. Back everything up and then upgrade through WordPress. Then back it up again.

Check Compatibility Using a Plugin

Even though you updated everything, there is still no guarantee that there won’t be an issue. Install WPEngine plugin, the way you do any WordPress plugin and then, when you activate it you will see a new Tools menu option – PHP Compatibility.

Choose which PHP version you want and then choose to run a scan on everything or on active themes and plugins. When the scan is finished you will see a list of warnings and errors.

Go through the list and replace or remove any themes or plugins that are not compatible with PHP 7 – where possible, just update. The plugin itself may also give you a few suggestions.

Upgrade PHP

Once you have done all this, its time to upgrade PHP. You can do this in several ways but by far the easiest is through your hosting provider’s dashboard. Like I said earlier, when you check the version of PHP you have, you may also be given an option to upgrade it as well.

Now’s the time to do it.

Check Your Website

The next step, once the upgrade is done, is to check that your website is still working as it should be. Load it up and check every element on every page to make sure it all works, and nothing has been disabled. Test your plugins and test your theme as well.

If everything works OK, then you have successfully upgraded to PHP 7.

Leave a Comment Below