PHP Upgrade Guide

From WHMCS Documentation

(Redirected from PHP 7 Migration Guide)

The version of PHP that the server hosting your WHMCS installation runs is important in order to run WHMCS successfully. In order to comply with each version's requirements, you must sometimes upgrade the PHP version on your WHMCS installation's server.

  • WHMCS 8.0 and higher requires PHP 7.2 or later. You won't see WHMCS 8.0 in the Automatic Updater if you do not run PHP 7.2 or PHP 7.3.
  • We recommend upgrading to PHP 7.4 after you successfully upgrade to WHMCS 8.0. WHMCS 8.0 introduced PHP 7.4 support. For more information, see Updating.
  • For more information about PHP support in WHMCS versions, see PHP Version Compatibility.

We recommend performing all of the tasks below in the presented order for the best experience and a minimized risk of disruption or downtime.

Upgrading PHP

When you upgrade PHP on the server that hosts your WHMCS installation, you will need to perform the following tasks:

  1. Ensure ionCube Loader® compatibility.
  2. Ensure ionCube-encoded file compatibility.
  3. Ensure custom and third-party code compatibility.
  4. If necessary for the new PHP version, upgrade to a compatible WHMCS version.
  5. Upgrade PHP.
  6. Make additional configuration updates.

See the sections below for more information on each step.

Ensure ionCube Loader Compatibility

ionCube Loader includes support for a bundled encoding feature that WHMCS uses to encode its files. If you use the Automatic Updater, WHMCS will not allow you to begin upgrading WHMCS until you are using the necessary version of ionCube Loader.

You must install the correct ionCube Loader version for your desired version of WHMCS before you update:

Minimum ionCube® Loader Version by WHMCS Version
WHMCS Version (Status) PHP v5.2 PHP v5.3 PHP v5.4 PHP v5.6 PHP v7.0 PHP v7.1 PHP v7.2 PHP v7.3 PHP v7.4 PHP v8.1
v6.3 (EOL) 4.6.1 4.6.1 4.6.1 4.6.1 -- -- -- -- -- --
v7.0 (EOL) -- -- -- 5.0.21 6.0.2 -- -- -- -- --
v7.1 (EOL) -- -- -- 5.0.21 6.0.2 -- -- -- -- --
v7.2 (EOL) -- -- -- 5.0.21 6.0.2 -- -- -- -- --
v7.3 (EOL) -- -- -- 5.0.21 6.0.2 -- -- -- -- --
v7.4 (EOL) -- -- -- 5.0.21 6.0.2 -- -- -- -- --
v7.5 (EOL) -- -- -- 10.1.0 10.1.0 10.1.0 10.2.0 -- -- --
v7.6 (EOL) -- -- -- 10.1.0 10.1.0 10.1.0 10.2.0 10.3.1 -- --
v7.7 (EOL) -- -- -- 10.1.0 10.1.0 10.1.0 10.2.0 10.3.1 -- --
v7.8 (EOL) -- -- -- 10.1.0 10.1.0 10.1.0 10.2.0 10.3.1 -- --
v7.9 (EOL) -- -- -- 10.1.0 10.1.0 10.1.0 10.2.0 10.3.1 -- --
v7.10 (EOL) -- -- -- 10.1.0 10.1.0 10.1.0 10.2.0 10.3.1 -- --
v8.0 (EOL) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 --
v8.1 (EOL) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 --
v8.2 (EOL) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 --
v8.3 (EOL) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 --
v8.4 (EOL) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 --
v8.5 (EOL) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 --
v8.6 (EOL) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 12.0.1
v8.7 (EOL) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 12.0.1
v8.8 (LTS) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 12.0.1
v8.9 (Active) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 12.0.1
v8.10 (RC) -- -- -- -- -- -- 10.2.0 10.3.1 10.4.3 12.0.1

We recommend using the most recent compatible ionCube Loader version.

Ensure ionCube-Encoded File Compatibility

Go to Utilities > System > PHP Version Compatibility to locate any ionCube-encoded files that won't work with a higher version.

WHMCS does not control these files but, if their encoding is incompatible with your environment, they may negatively affect WHMCS. Make certain that you update these files to ensure compatibility before continuing.

Ensure Custom and Third-Party Compatibility

New PHP versions may introduce changes or remove deprecated functions.

To reduce issues, manually verify your custom code and check with third-party vendors to ensure that their code is compatible your desired PHP version. Often, third-party vendors have already released updates to ensure this compatibility.

See PHP's documentation for more information about changes in each PHP version:

Upgrade to a Compatible WHMCS Version

If your current WHMCS version does not support the desired new version of PHP, upgrade WHMCS to a version that does.

You can do this using the Automatic Updater utility at Utilities > Update WHMCS or by performing an update manually.

For a full index of PHP compatibility by WHMCS version, see System Environment Guide.

After you do this, ensure that your ionCube Loader version is still up-to-date and that there are not additional items to address at Utilities > System > PHP Version Compatibility.

Upgrade PHP

Before you upgrade PHP, make certain that:

Then, proceed to upgrade the PHP version your site is running.

If you use cPanel & WHM and EasyApache 4 to host your WHMCS installation, you can use MultiPHP Manager and MultiPHP INI Editor to change your PHP version.

Make Additional Configuration Updates

After upgrading PHP, you may need to update your configuration to reflect the change. These changes depend on the configuration you choose for your WHMCS installation and any customizations that you use.

For example, some WHMCS installations may require updates to the cron configuration and editing the cron's php.ini file.

Errors

If you experience any of the following error conditions when visiting a URL in WHMCS, there may be compatibility issues with your new PHP version:

  • A 500 internal server error
  • A blank page
  • An oops error page

For help, see PHP Upgrade Troubleshooting Guide. For an immediate solution, reverting to the previous PHP version should allow you to regain access to the WHMCS system.