Supercharge your WordPress site with PHP 7

Supercharge your WordPress site with PHP 7
PHP is a web scripting language that is the foundation of many websites and web frameworks. If your website uses WordPress, it uses PHP. It enables you to run scripts and work with data on the server side of your website as opposed to the user side (which is covered by JavaScript). It’s not the only web scripting language of course, but it’s ease of setup, support by web hosts and adoption by the incredibly popular WordPress CMS make it one of the most popular ways to power a website.

What is PHP?

PHP is a web scripting language that is the foundation of many websites and web frameworks. If your website uses WordPress, it uses PHP. It enables you to run scripts and work with data on the server side of your website as opposed to the user side (which is covered by JavaScript). It’s not the only web scripting language of course, but it’s ease of setup, support by web hosts and adoption by the incredibly popular WordPress CMS make it one of the most popular ways to power a website.

PHP 7 has been out for a while now. Version 7.1 was introduced on 1st December 2016, bringing more improvements and new features for developers. With version 7.0 seeing release at the end of 2015. That means that there has been ample time for the new version to mature and become a stable, secure option for PHP web apps and sites.


What do I have to gain?

Although developers have quite a few new toys to play with when it comes to PHP 7, the huge performance improvements are something everybody can get excited about.

In many benchmarks PHP 7 comes out roughly twice as fast as previous versions and uses far less memory. This means that just upgrading your sites and web apps to run on PHP 7 can serve up to three times as many users and dramatically cut load times to your site.


Is it much of a hassle?

Unless you’re using very old code, or rely on legacy extensions, the chances are that your website and PHP 7 will get on fine. Having said that just blindly updating can cause problems. If you’re redesigning your website or creating a brand new site using WordPress or another PHP framework – use PHP 7. There’s no reason not too!


Is running an older version a risk?

Right now, if your web server is running the latest version of PHP 5.6, you’re probably OK. PHP 5.6 is still getting support for a while. Until 31st December 2018, PHP 5.6 will still receive security fixes, meaning that it’s still OK to use in production.

The problem is, a lot of websites aren’t even using 5.6. Web servers using 5.5, 5.4 and even older are still extremely prevalent and these versions have no longer receiving security fixes. This means a huge amount of WordPress websites currently live are potentially insecure.


What do I do?

If you’re maintaining your WordPress website yourself, your upgrade path will vary depending on how your website is hosted. Most hosting providers are now offering PHP 7 to their customers. It’s important to check the compatibility of your WordPress version and any plugins or themes you are using. If you’re unsure, it’s worth having an expert opinion and making backups before making the leap.