|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
− | The version of PHP that the server hosting your WHMCS installation runs is important in order to run WHMCS successfully.
| + | #REDIRECT [[PHP Upgrade Guide]] |
− |
| |
− | <div class="docs-alert-success">
| |
− | * The steps below apply to upgrades from PHP 5 or higher to later WHMCS-supported versions of PHP.
| |
− | * We recommend performing the steps below in the presented order for the best experience and a minimized risk of disruption or downtime.
| |
− | </div>
| |
− |
| |
− | == Upgrade ionCube® Loader ==
| |
− |
| |
− | 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:
| |
− |
| |
− | {{:IonCube Loader Version Matrix}}
| |
− |
| |
− | We recommend using the most-recent compatible ionCube Loader version.
| |
− |
| |
− | == Upgrade WHMCS ==
| |
− |
| |
− | Upgrade WHMCS to a version that supports your desired version of PHP. You can do this using the '''[[Automatic Updater]]''' at '''Utilities > Update WHMCS''' or by [https://go.whmcs.com/1709/Updating-WHMCS-Manually performing an update manually].
| |
− |
| |
− | For a full index of PHP compatibility by WHMCS version, see [[System Environment Guide#PHP|System Environment Guide]].
| |
− | | |
− | == Run the WHMCS PHP Version Compatibility Utility ==
| |
− |
| |
− | The report at '''Utilities > System > [[PHP Version Compatibility]]''' in WHMCS 7.5 and later can identify ionCube-encoded custom or third-party code that may not be compatible with newer versions of PHP.
| |
− |
| |
− | We recommend running this utility before any change you make to your system's PHP version.
| |
− | | |
− | == Assert Compatibility of Custom and Third-Party Code ==
| |
− |
| |
− | New PHP versions often introduce changes or remove [https://secure.php.net/manual/en/migration70.deprecated.php deprecated functions]. These changes can cause issues like runtime errors in older code.
| |
− |
| |
− | * Manually verify this in any code that you wrote or customized.
| |
− | * 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:
| |
− |
| |
− | * [https://www.php.net/manual/en/migration70.php PHP 7.0]
| |
− | * [http://php.net/manual/en/migration71.php PHP 7.1]
| |
− | * [http://php.net/manual/en/migration72.php PHP 7.2]
| |
− | * [https://www.php.net/manual/en/migration73.php 7.3]
| |
− | * [https://www.php.net/manual/en/migration74.php 7.4]
| |
− | * [https://www.php.net/manual/en/migration80.php 8.0] <div class="docs-alert-warning">WHMCS does not support PHP 8.0. However, changes for PHP 8.0 may impact your updates to custom and third-party code.</div>
| |
− | * [https://www.php.net/manual/en/migration81.php 8.1]
| |
− |
| |
− | == Upgrade PHP ==
| |
− |
| |
− | Before you upgrade PHP, make '''certain''' that:
| |
− |
| |
− | * You have the necessary ionCube Loader version for your target PHP version.
| |
− | * You are running [[PHP_Version_Support_Matrix|a version of WHMCS that supports your target PHP version]].
| |
− | * Any custom or third-party code (and its encoding, if applicable) is compatible with your target PHP version.
| |
− |
| |
− | Then, proceed to upgrade the PHP version your site is running:
| |
− |
| |
− | * If you run cPanel & WHM and EasyApache 4, you can change your website's PHP version using '''[https://docs.cpanel.net/cpanel/software/multiphp-manager-for-cpanel/ MultiPHP Manager]''' in your cPanel control panel.
| |
− | * For other control panels or systems, consult the vendor's documentation.
| |
− | | |
− | == Additional 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 <tt>php.ini</tt> 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 7 Migration Troubleshooting Guide]]. For an immediate solution, reverting to the previous PHP version should allow you to regain access to the WHMCS system.
| |
− |
| |
− | ''Last Updated: October 2022''
| |