Updating to WHMCS 8.6 & PHP 8.1

The latest release of WHMCS, soon to be released under General Availability, sees compatibility introduced for PHP 8.1. PHP 8.1 is the latest stable version of PHP and brings with it stability and performance improvements making it the best choice for running a WHMCS instance.
Below is our quick how-to guide for updating to WHMCS 8.6 and PHP 8.1 in under 10 minutes. We step through upgrading to WHMCS 8.6 first, followed by making the switch to PHP 8.1. It is important to perform the upgrades in this order to avoid any interruptions in service.
For a more detailed guide, please refer to our PHP Migration Guide Documentation.
Updating to WHMCS 8.6
WHMCS 8.6 supports PHP 7.2, 7.3, 7.4 and 8.1.
Our team went to great efforts to make this possible by patching a number of the libraries and 3rd party dependencies that WHMCS uses and interacts with which do not offer this wide ranging level of PHP support natively. This makes things easier for you by facilitating upgrades to WHMCS 8.6 from the widest possible range of existing PHP versions which means you get to avoid having to do multiple step increments between PHP versions.
Step 1: Update WHMCS
The first step is to update WHMCS to the latest 8.6 release. At the time of publishing, this is 8.6.0.
We recommend using the Automatic Updater since this will perform some environment checks to help ensure your system is compatible with the latest version before updating.
If the update is not already showing as available, click the Check Now button located near the bottom of the page to refresh the latest version information.
If you still don’t see the latest version following check for updates, this indicates that your environment does not meet the requirements necessary to run it. Most often, this occurs when you are running an incompatible PHP version. WHMCS 8.6 requires PHP 7.2 or later. If you are running an earlier version, you will need to first update PHP version to PHP 7.2. This will allow you to update to WHMCS 8.6. Subsequently you’ll be able to update the PHP version to 8.1.
The update process typically takes 20-60 seconds depending upon your hosting environment.
When complete, you will see a success confirmation. Click to continue.
As with any update, it is important to perform any necessary template updates in custom themes. These are detailed in the release notes for each version which can be found at https://docs.whmcs.com/Release_Notes
Step 2: Verify Compatibility of Custom & 3rd Party Code
WHMCS makes available a PHP Version Compatibility tool for pre-determining the compatibility of both WHMCS core files as well as any custom and 3rd party modules & integrations with alternative PHP versions. You should always use this tool to identify any potential issues prior to modifying your PHP version.
To access this tool and use it to prepare for updating to PHP 8.1, follow the steps below:
Code identified as having an unknown compatibility status can mean it is encoded using options that are not recognised by WHMCS. The 3rd party vendor should be able to confirm if it is safe to proceed with the upgrade for files reflecting this messaging.
Step 3: Update PHP
Now running WHMCS 8.6, and having verified compatibility of all custom & 3rd party code, you are ready to update the PHP version for the environment hosting WHMCS.
The following steps assume you are using cPanel.
This indicates that PHP 8.1 has not been enabled within WHM. If you have WHM access, you can enable this via EasyApache 4. If you do not have WHM access, you will need to contact your host. Learn more
You can verify the change has taken effect by switching back to WHMCS and navigating to Utilities > System > PHP Info and confirming the version number shown in the PHP banner at the top of the page.
And that’s it! You’re now updated to the latest WHMCS and PHP release, all with zero downtime.
Let us know how you get on in the comments below!
