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.

Troubleshooting

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

You may encounter the following common issues after you update your PHP version:


Error or IssueCauseNext Steps
Fatal error: The file /home/username/public_html/whmcs/modules/gateways/ewayuk.php was encoded by the ionCube Encoder for PHP 5.3 and cannot run under PHP 7.0. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0There is a PHP version encoding error due to outdated file for a previous WHMCS version.ionCube Fatal Decoding Errors
Oops!WHMCS returns Oops! errors for many reasons.Oops! Errors

Last modified: 2025 March 28