Updating WordPress to PHP 7.2

If your WordPress hosting isn’t using PHP 7.2 you should look into updating. The latest version of PHP is more secure and quicker than its older versions.

PHP 5.6 through to 7.0 has its security support end December 2018

WordPress php versionsAs from the image above not only is the common 5.6 PHP version years outdated it is also on its last legs for security support. Once security support ends you wont just instantly be hacked but your website will be on unstable grounds.

Another reason to update to the modern PHP 7.2 is performance. PHP 7.0 removed many old and unused functions as well as making existing functions more efficient.

wordpress php version performance chart
kinsta.com

You can see that 7.2 is almost 3 times quicker than 5.6 for WordPress requests. Updating to 7.2 gives you the ultimate benefit of a speedier website, that is if you are still following proper principles.

The benefits are there and you can ensure your WordPress website is future proof but before you update to PHP 7.2 you need to do one thing, that is check your theme and plugins for compatibility.

Download and run PHP compatibility checker this plugin will check your theme and installed plugins to see if they will work on 7.2 or if there may or will be issues.

If you have the all clear then great lets update to PHP 7.2 The first step in this process is to back up your WordPress website. It’s highly unlikely anything will go wrong but its best to be safe.

If you have access and/or your WordPress is hosted with cPanel find the Select PHP Version app

cpanel php version selectThen in the drop down choose 7.2 down the bottom click Use Defaults, this set common PHP packages/libraries to be installed or enabled with the PHP version update. Do note that WordPress requires many of these to work see here.

php version update 7.2Now click the Set as current button next to 7.2 the page will refresh and your PHP version will be now 7.2

If you don’t have WordPress installed through cPanel hosting contact your hosting provider or if its installed on an Ubuntu instance look at this.

Check your WordPress still works and loads. Go into your dashboard, Create post and if you’re really curious check the error_log. If it all works which it should if you ran the PHP compatibility checker and it showed to be compatible with 7.2 then well done.

Otherwise you will have to try a lower PHP version or remove plugins that are in compatible.