header tail

why you should regularly update PHP

home / why you should regularly update PHP

WordPress website-owners often overlook updating their PHP to the latest version. But with PHP affecting site performance, security and speed, the advantages of updating are substantial…

what is PHP?

PHP (or Hypertext Preprocessor) is an open-source coding language found on millions of websites. It’s most commonly used for server-side scripting, including accessing files, executing commands and opening network connections.

WordPress is built with PHP, but most users don’t need to know anything about PHP in order to create and manage their WordPress websites. However, this means that PHP updates are often overlooked or seen as not important.

As PHP was developed nearly 30 years ago, there are a large number of legacy PHP versions that aren’t actively maintained. Whilst WordPress and other websites may still work with old PHP versions, updating to the latest PHP offers a huge boost for your site’s speed, performance and security.

how to check your PHP version

Your PHP version is set by your web hosting provider at server-level.

You can check which PHP version you’re using by:

  • Uploading the following PHP file to your server: <?php phpversion(); ?>
  • Running the php -v command prompt in your server command line
  • Simply asking your hosting provider or WordPress agency

You can compare your PHP version with the latest version as listed on the PHP website. WordPress currently recommends using PHP version 7.4 or later.

why you should update PHP version

Just as you need to keep WordPress core, plugins and themes up-to-date, your site’s PHP version needs to be updated too. As PHP itself says:

“PHP, like any other large system, is under constant scrutiny and improvement. Each new version will often include both major and minor changes to enhance security and repair any flaws, configuration mishaps, and other issues that will affect the overall security and stability of your system.

“Like other system-level scripting languages and programs, the best approach is to update often, and maintain awareness of the latest versions and their changes.”

Using the latest PHP version is hugely beneficial for:

  • Security: Only the most recent versions of PHP are regularly patched against security vulnerabilities. If you have an outdated PHP, your WordPress website is more likely to be hacked.
  • Performance: The latest PHP versions include bug fixes, thus reducing errors on your site and improving user experience.
  • Speed: Updating a WordPress site to the latest PHP version can result in speed increases of up to four times! Not only is this better for users but it also results in improved search engine rankings.
  • Features: New features are added to updated PHP versions, thus giving your website increased functionality. These features also often simplify things for developers, thus saving you time and money when your WordPress website code needs updaing.

how to update PHP

How to update your PHP depends on your hosting package, so contact your hosting provider for more information.

However, before updating, make sure to do the following:

  • Backup: As with all updates, it’s important to backup your website first. This will enable you to revert to your backup in case of any problems.
  • Update your software: Make sure your WordPress core, plugins and themes are up-to-date with their latest versions, in order to maximise likelihood that they’re compatible with the newest version of PHP.
  • Check PHP compatibility: It’s a good idea to contact your WordPress design agency and ask them to check the PHP compatibility of your site. They can also fix any PHP compatibility issues in advance.

Once you’ve performed these steps, you’re ready to update your PHP. You can now look forward to a faster, better performing and more secure site!

need help?

For support with PHP updates or any other aspect of WordPress website management, give us a call on  020 8747 3274 and we’ll be happy to help.