fbpx
Best Practices

Upgrade PHP on Amazon Lightsail

PHP is a programming language that stands for PHP Hypertext Preprocessor. I know, I know. How can an acronym stand for itself? It just does. PHP is the backbone of WordPress sites.

There are many reasons to keep the PHP version of your website up to date.

  1. First and foremost is cybersecurity. Each new version of PHP has patches for previously discovered vulnerabilities. Keeping your site on the latest revision means you get all of the security patches.
  2. New versions of PHP also tend to boast better performance. That means your website will load faster and be better for users.
  3. There are also new features that come with PHP or may be relied on by new features of WordPress. Keeping everything current ensures you can take advantage of these when they are released.

Unfortunately, unlike some other hosts, there is no single button you can click to upgrade PHP versions on Amazon Lightsail. I upgrade all of my servers annually. There is not often a major release of PHP and even when one comes out, it is not immediately available in Lightsail. Checking and performing the upgrade once per year is about the right cadence for me.

To do so you must:

  1. Log in to the current site and perform a backup using Updrafts Plus plugin
  2. Spin up a new instance of a WordPress Binami server
  3. Log in using the default user password and install and connect Updrafts Plus backups
  4. Restore the latest backup
  5. Move the static IP associated with the live site to the new server
  6. Perform a bncert-tool upgrade and generate a new certificate

It’s not quite as convenient as a single button press, but there are other upgrades that come with the latest and greatest server configurations for WordPress utilizing Bitnami in Amazon Lightsail. So it is a good annual maintenance activity to keep your sites fast, secure, and user friendly.