If you're reading this, you were probably sent here by our support team or by a message from your website. This article will try to explain to you:

  • What is PHP and why should you care?
  • Which PHP versions are available and what happens to old versions?
  • How do you update your site to run the latest PHP version?

What is PHP?

PHP (Hypertext Preprocessor) is a programming language, natively used by WordPress: the Content Management System that we as Savvii specialize in. If somebody visits your website that is hosted with us, our servers will execute this PHP code on our server and the result is a (HTML / CSS / JS) webpage that our server will send to the visitor of your website. So, this code is responsible for almost everything that is connected to your website, including storing and handling sensitive data. This means that this code needs to be secure and fast at the same time. Because computers and people evolve over time, programming languages will have to do the same to keep up.

PHP versions

Without going into too much detail about the history of PHP, here are a few important things to know. New versions of PHP will be released every once in a while. This means that the focus of development of the programming language will shift gradually to every newer version that is released. This means that development on older versions will eventually stop. Once development stops, the code will be vulnerable to newly discovered flaws, exploits and bugs. This means that those versions should not be used anymore. At the moment of this writing (October 2018) there are 5 versions that receive development focus. But at the end of 2018, 2 of those versions will not get updated anymore. That means that we, as Savvii, will stop running this code on our platform because new security flaws will not get fixed anymore. Following is a list of currently maintained PHP versions and their end of life (EOL) moment:

  • PHP 5.6 (only security updates) - EOL: Dec 31 2018
  • PHP 7.0 - EOL: Dec 3 2018
  • PHP 7.1 - EOL: Dec 1 2019
  • PHP 7.2 - EOL: Dec 1 2020
  • PHP 7.3 (development only)

(Check out the official page for a better overview)

And your website?

Is your website still running PHP 5.6 or 7.0? Then the time is now to start updating your website and start running a newer PHP version. Here's how:

If you don't really care about possible downtime of your website:

The process is relatively easy. But take our advise:

Before you update your PHP version, make sure you update your WordPress version, your plugins and your themes to the latest versions. This will greatly reduce the chance of compatibility errors.

  1. Log in to our control panel, navigate to the management of your website and check out (and remember) the PHP version.
  2. Optional: create a backup of your site!
  3. Change the PHP version, preferably to 7.2.
  4. Wait a minute and check out your website.
  5. Website still running? Make sure all important functions work as well.
  6. Notice errors? Or things aren't working as they should? You have 2 options:
    • If you know what's wrong and you don't mind a bit more downtime: try to fix the problems on the spot (check out our guide below).
    • Switch back to the previous PHP version and skip ahead.
  7. Does your website still work like it should? Well done! Continue to your next website or enjoy!

If you want to prevent (longer) downtime:

  1. Log in to our control panel, navigate to the management of your website and get to the tab staging.
  2. Create a staging environment of your website, you can use this guide to get it up and running.
  3. Once this staging environment has been created, log in to that WordPress installation and start updating plugins, themes and WordPress itself to the latest versions.
  4. Use the previously mentioned guide to change the PHP version to 7.2
  5. Check if the website and all important functionalities are still working.
  6. Is the website down or are there issues? Check out the guide below. 
  7. Everything OK? You have two options to get these staging changes to your production website
    • You can use the merge functionality (staging guide, step 5) of our control panel to merge all changes on the staging site to the production site. Warning: if your production site is a webshop, or a website which has undergone changes in its database while you were working on the staging site: this merge will overwrite all changes to the database, including orders!
    • You can assume that your production website will work the same as the staging site, so any changes to the staging site can be done to the production site as well. This goes for updates and any errors you might need to fix. This might cause downtime but at least you know what to do in case of problems as you have fixed them on the staging before.

Updating and errors:

If you notice something is going wrong while testing your website on a newer PHP version, there is a good chance that the cause of the problems will be logged in the error logs of the site. Please check out this guide to find out how to get to the error logs. The most obvious errors will state something along the lines of PHP Fatal error and might look something like the following example:

PHP message: PHP Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/***-***/wordpress/current/wp-content/plugins/revslider/includes/framework/base-admin.class.php:71
Stack trace:
#0 /var/www/***-***/wordpress/current/wp-content/plugins/revslider/admin/revslider-admin.class.php(552): RevSliderBaseAdmin::addMetaBox('Revolution Slid...', '', Array, NULL)
#1 /var/www/***-***/wordpress/current/wp-content/plugins/revslider/admin/revslider-admin.class.php(73): RevSliderAdmin->addSliderMetaBox()
#2 /var/www/***-***/wordpress/current/wp-content/plugins/revslider/admin/revslider-admin.class.php(44): RevSliderAdmin->init()
#3 /var/www/***-***/wordpress/current/wp-content/plugins/revslider/revslider.php(165): RevSliderAdmin->__construct('/var/www/***...')
#4 /var/www/***-***/wordpress/current/wp-settings.php(305): include_once('/var/www/***...')
#5 /var/www/***-***/wordpress/current/wp-config.php(95): require_once('/var/" while reading response header from upstream, client: #.#.#.#, server: www.domain.org, request: "GET /wp-admin/ HTTP/1.1", upstream: "fastcgi://unix:/dev/shm/php-fpm.***-***.sock:", host: "www.domain.org"

In this example, you might notice that the error states that "something is wrong" in "/var/www/***-***/wordpress/current/wp-content/plugins/revslider/includes/framework/base-admin.class.php:71". This will already tell you that the plugin "revslider" has something to do with the error. You can try disabling the plugin and see if that fixes your problems. If so: the plugin is either outdated or the developer of that plugin hasn't updated it to work with the newer PHP versions yet.

It might be that your site is not logging errors properly? You can ebable WordPress debugging for additional information. Open your wp-config.php file and search for the following line (usually near the end of the file):

define( 'WP_DEBUG', false );

Change the value false to true and you've enabled debugging. Your site will log additional messages if they are available.

If this is all too technical for you, the best way to go about fixing errors is to ask your website developer or hire a developer to look into this. You may also contact us, based on the logs we might be able to give you more information and point you in the right direction.

Other issues / questions

Why is PHP 7.3 not available yet?

PHP 7.3 is not yet deemed stable enough to run on production servers. As soon as the PHP developers release a production version we will make sure that it will be available for you to test and use.

Are there plugins that are known to cause issues with newer PHP versions?

There are, but usually the problem is that the plugin has not been updated to the latest version yet. Please check out the list below (we will update this list with plugins we find that might cause problems):

  • Revolution slider (revslider) will cause issues if not updated.