What Does the PHP 7.2 Upgrade Mean for Your Site?

Need WordPress Hosting?View Our Plans
Three people looking at a computer screen.

If you’re a regular reader of Pressable’s blog, you’ll know that we like to compare websites to buildings. The structure is the website code, like HTML, CSS, PHP, JavaScript, images, etc., the land and infrastructure are your web host, and your address is your domain name. In this article we will look at PHP, which acts as both structure and infrastructure since your web host operates the engine that runs PHP. This language is essential for running a WordPress website since it’s the code that dynamically interacts with your site’s database and allows you to create pages, posts and other content.

What Is PHP?

PHP, originally known as Personal Home Page, was created in 1994 by Rasmus Lerdorf. Developers quickly recognized PHP’s potential since it allowed for variables, form handling, and HTML embedding. This basic functionality is what still makes PHP a valuable programming language for web design. Today PHP stands for PHP Hypertext Preprocessor and is used in a wide variety of websites, including Facebook, Slack, and most importantly, WordPress.

Since PHP started as a personal project and not a formal programming language, there have been a lot of inconsistencies in function naming and parameter ordering. Over the years this led many programmers to dismiss PHP as a sub-standard programming language; however, since it is relatively easy to learn and implement, PHP is one of the most used programming languages in the world.

Modern PHP Versions

In 2014 and 2015, a new major version of PHP was proposed:  PHP 7.x. This version of PHP saw a complete overhaul of the language and resulted in a drastic performance improvement; however, this change also caused many WordPress themes and plugins to break because ‘mysql_*’ functions were removed completely and replaced with ‘mysqli_*’ functions, for example. At Pressable we regularly see errors likes these from sites moving from a host still running PHP 5.6.

Today, Pressable has made PHP 7.2 available on all of our clients’ sites. Since we’ve upgraded from PHP 7.0 to 7.2, we’ve seen most speed tests improve by ~20%. In addition to allowing more speed, PHP 7.2 has added Libsodium to its standard library, allowing for encryption, decryption, signatures, password hashing, and more. With more clients and users focusing on privacy and security, this is welcome news.

Jilt Logo

Get 14 days of unlimited access to Jilt email marketing

Simply sign up for an annual subscription for a Managed WordPress Site with WooCommerce.

Get Started Today

How Will the Update Affect Your Site?

The main thing developers have to worry about is deprecation. As PHP advances in performance and security, it’s deprecating old functions and methods. This means that old ways of coding PHP will either stop working or start giving error messages when debugging. It is important that you understand if your code is compatible with PHP 7.2 so that your sites continue running. In order to make sure that your sites are compatible with PHP 7.2, Pressable has developed a PHP 7.2 compatibility tool which will scan your PHP code and help you identify what needs to be updated.

The good news is WordPress 5.1 is completely PHP 7.2 compatible,  and so are the default themes. If you are using a theme or plugin that has not been updated in the last year, we recommend that you either contact the developer about an update, or consider an alternative.

If you’re concerned that your site may not be PHP 7.2 compatible, you can always contact your friendly Pressable support team. We’re here 24/7 to ensure that your site stays up and running, no matter what.