PHP Upgrades

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

For more information about WHMCS’s current PHP version support, see System Requirements.

Upgrade 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.
We recommend performing all of the tasks below in the presented order for the best experience and a minimized risk of disruption or downtime.

1. 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.

2. 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.

The PHP 8.2 tab in PHP Version Compatibility in WHMCS 8.11 and higher.

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.

3. Ensure customization and third-party code 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.

  • For more information about the changes in your PHP version, see PHP’s PHP 7.2, PHP 7.3, PHP 7.4, and PHP 8.1 documentation.
  • While WHMCS does not support PHP 8.0, we also recommend checking the PHP 8.0 documentation for changes that may affect custom or third-party code.

4. 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 at Utilities > Update WHMCS or by performing an update manually.

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.

5. Upgrade PHP.

Before you upgrade PHP, make certain that you have performed all necessary updates for ionCube Loader and WHMCS and that any custom or third-party code (and its encoding) is compatible with your target PHP version. Then, proceed to upgrade the PHP version your site is running.

6. Make any additional configuration changes.

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.

Common Errors

Errors after upgrading PHP usually indicate an incompatibility (for example, a syntax error or decoding issue).

For steps to view additional error details, see Enabling Error Reporting.

You may see one of the following common errors after you update your PHP version:

ErrorDescriptionRecommended Solution
Oops! Something went wrong and we couldn't process your requestA fatal error has occurred. Usually, this indicates that your version of PHP is missing some of WHMCS’s required extensions or there are PHP files on your system that use deprecated or unavailable functions.Enable error reporting to find details about the exact issue.
The file was encoded by the ionCube Encoder for PHP x.x and cannot run...A file uses encoding for an older version of ionCube Encoder that does not support your version of PHP.
  • If the file is from a third-party developer, contact the original author of the file for an updated version.
  • If the file is from WHMCS, check our Release Notes for deprecation and removal notices. In most cases, the file no longer ships with WHMCS and you can delete it safely.

Last modified: October 31, 2024