Difference between revisions of "PHP Upgrade Guide"
From WHMCS Documentation
(→Before you upgrade) |
|||
Line 1: | Line 1: | ||
− | In order to comply with each version's requirements, you must sometimes upgrade the PHP version on your WHMCS installation's server. | + | 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. | + | * 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 | + | * For more information about PHP support in WHMCS versions, see [[PHP Version Compatibility]]. |
− | + | ||
− | |||
== Before you upgrade == | == Before you upgrade == | ||
− | + | ||
Before you upgrade PHP, we recommend that you: | Before you upgrade PHP, we recommend that you: | ||
− | + | ||
− | * Ensure that | + | * Ensure that you have installed the necessary ionCube Loader® version. |
− | * | + | * Go to '''Utilities > System > [[PHP Version Compatibility]]''' to locate any ionCube-encoded files that won't work with a higher version. |
* Ensure the compatibility of any custom or third-party code by checking the relevant listings in the WHMCS Marketplace. | * Ensure the compatibility of any custom or third-party code by checking the relevant listings in the WHMCS Marketplace. | ||
− | + | ||
== Upgrade using cPanel's MultiPHP == | == Upgrade using cPanel's MultiPHP == | ||
− | + | ||
If you use cPanel & WHM and EasyApache 4 to host your WHMCS installation, you can use '''[https://docs.cpanel.net/cpanel/software/multiphp-manager-for-cpanel/ MultiPHP Manager]''' and '''[https://docs.cpanel.net/cpanel/software/multiphp-ini-editor-for-cpanel/ MultiPHP INI Editor]''' to change your PHP version. | If you use cPanel & WHM and EasyApache 4 to host your WHMCS installation, you can use '''[https://docs.cpanel.net/cpanel/software/multiphp-manager-for-cpanel/ MultiPHP Manager]''' and '''[https://docs.cpanel.net/cpanel/software/multiphp-ini-editor-for-cpanel/ MultiPHP INI Editor]''' to change your PHP version. | ||
− | + | ||
<div class="docs-alert-warning"> | <div class="docs-alert-warning"> | ||
For other control panels or systems, consult the vendors' documentation. | For other control panels or systems, consult the vendors' documentation. | ||
</div> | </div> | ||
− | + | ||
− | To upgrade PHP | + | To upgrade PHP in cPanel: |
− | + | ||
# Log in to your cPanel account. | # Log in to your cPanel account. | ||
# Go to '''Software >> MultiPHP Manager'''. | # Go to '''Software >> MultiPHP Manager'''. | ||
− | # | + | # Select the domain for your WHMCS installation. |
− | # Select PHP | + | # Select the desired PHP version from '''PHP Version''' in the top-right corner of the page. |
#* If the desired version isn't available and you have WHM access, [https://docs.cpanel.net/ea4/php/how-to-locate-and-install-a-php-version-or-extension/ use EasyApache 4 to install a higher version of PHP]. | #* If the desired version isn't available and you have WHM access, [https://docs.cpanel.net/ea4/php/how-to-locate-and-install-a-php-version-or-extension/ use EasyApache 4 to install a higher version of PHP]. | ||
− | #* If the desired version isn't available and you do not have WHM access, contact your system administrator. | + | #* If the desired version isn't available and you do not have WHM access, contact your hosting provider or system administrator. |
# Click '''Apply'''. | # Click '''Apply'''. | ||
− | # Go to '''Software >> MultiPHP INI Editor'''. | + | # Go to '''Software >> MultiPHP INI Editor'''. |
# Click '''Editor'''. | # Click '''Editor'''. | ||
# Select your domain from '''Select a location'''. A <tt>php.ini</tt> file (or a blank file if you don't have a <tt>php.ini</tt> file yet) will appear. | # Select your domain from '''Select a location'''. A <tt>php.ini</tt> file (or a blank file if you don't have a <tt>php.ini</tt> file yet) will appear. | ||
Line 37: | Line 36: | ||
# Click '''Save'''. | # Click '''Save'''. | ||
# Log in to your WHMCS installation to ensure that there aren't any errors. | # Log in to your WHMCS installation to ensure that there aren't any errors. | ||
− | + | ||
− | |||
− | |||
==Errors== | ==Errors== | ||
− | + | ||
After you upgrade, the following errors could indicate an incompatibility with the new PHP version: | After you upgrade, the following errors could indicate an incompatibility with the new PHP version: | ||
− | + | ||
* A 500 internal server error | * A 500 internal server error | ||
* A blank page | * A blank page | ||
* An oops error page | * An oops error page | ||
− | + | ||
See our [PHP Troubleshooting Guide] for steps to debug and resolve these issues. For an immediate solution, reverting to the previously-installed PHP version should allow you to keep using WHMCS. | See our [PHP Troubleshooting Guide] for steps to debug and resolve these issues. For an immediate solution, reverting to the previously-installed PHP version should allow you to keep using WHMCS. |
Revision as of 15:56, 7 September 2022
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.
Before you upgrade
Before you upgrade PHP, we recommend that you:
- Ensure that you have installed the necessary ionCube Loader® version.
- Go to Utilities > System > PHP Version Compatibility to locate any ionCube-encoded files that won't work with a higher version.
- Ensure the compatibility of any custom or third-party code by checking the relevant listings in the WHMCS Marketplace.
Upgrade using cPanel's MultiPHP
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.
For other control panels or systems, consult the vendors' documentation.
To upgrade PHP in cPanel:
- Log in to your cPanel account.
- Go to Software >> MultiPHP Manager.
- Select the domain for your WHMCS installation.
- Select the desired PHP version from PHP Version in the top-right corner of the page.
- If the desired version isn't available and you have WHM access, use EasyApache 4 to install a higher version of PHP.
- If the desired version isn't available and you do not have WHM access, contact your hosting provider or system administrator.
- Click Apply.
- Go to Software >> MultiPHP INI Editor.
- Click Editor.
- Select your domain from Select a location. A php.ini file (or a blank file if you don't have a php.ini file yet) will appear.
- Add these lines to the file: php_admin_flag[allow_url_fopen] = 1
php_admin_flag[memory_limit] = 128M - Click Save.
- Log in to your WHMCS installation to ensure that there aren't any errors.
Errors
After you upgrade, the following errors could indicate an incompatibility with the new PHP version:
- A 500 internal server error
- A blank page
- An oops error page
See our [PHP Troubleshooting Guide] for steps to debug and resolve these issues. For an immediate solution, reverting to the previously-installed PHP version should allow you to keep using WHMCS.