This article shows you how to update PHP to a different version. The latest version is PHP 7, which includes many upgrades to speed and stability. For more information about PHP 7, navigate here.
Change PHP for Grid
Instructions for changing your Grid PHP version may be found in this article. PHP 7 is now available for all Grid users.
Change PHP for Plesk
These instructions will show you how to use the Plesk admin panel to change PHP versions. Start by logging into Plesk.
1. Log into the Plesk admin panel and select Tools & Settings from the options on the left.
2. Select Updates and Upgrades from the Plesk column.
3. Select Add/Remove Components
4. Use the + next to Web hosting to expand the column, then do the same for PHP interpreter versions. Change your desired version to install and click continue.
The Plesk installer will run. Once complete, you will be able to use your chosen PHP version.
Note: You do not necessarily need to remove previous versions of PHP. Doing so may cause conflict with various native Plesk applications such as Horde.
Change PHP for cPanel
These instructions will show you how to use the cPanel WHM utility to change PHP versions.
You may need to install your desired version of PHP before you may use it. PHP version installation is handled through the EasyApache template configuration tool. If you know that you already have the version of PHP that you require, skip the EasyApache PHP installation instructions.
Note: Only one version of EasyApache may be active at a time. cPanel supports PHP 7 via EasyApache 4 only. You must use EasyApache 4 if you plan to use PHP 7 with your cPanel install.
Instructions for EasyApache 3
1. Log into WHM and select the Software panel.
2. Select EasyApache 3. If EasyApache 4 is active, you'll receive an error letting you know that another version is currently active and you will need to either revert back to EasyApache 3 or select EasyApache 4. Only servers that were originally provisioned with EasyApache 3 may revert back to it.
3. You should now see a list of available Apache profiles. From here it is easy to manage various aspects of your Apache build. To change your PHP version, select the edit tool to the right of your default profile.
4. Select Next Step to move to the PHP version menu. Select the version that you'd like to install and proceed through the remaining menus.
Important: It is very important to allow the EasyApache build process to complete. A premature termination will very likely result in a total failure of cPanel, and you will have to restore from a backup.
Instructions for EasyApache 4
1. If you haven't installed EasyApache 4, connect to your server via SSH and execute the following:
- Confirm the installation using 'y'. This process make take several minutes to complete.
2 . Once EasyApache 4 installation is complete, log into WHM and select the Software panel.
3. Select EasyApache 4 from the software list.
4. Click the Customize button to the right of Currently Installed Packages. If you would also like to change your package, select one from the list and use the Customize option. Please be aware that changing these settings may impact the performance of your cPanel installation.
5. From the menu on the left, click on PHP Versions. Select the version(s) of PHP that you'd like to install and click Next.
6. You'll now be asked to select PHP extension packages. If you are unsure of which ones you need, use the default selected packages for your PHP version. Click Next.
7. The review section will now give you an overview of everything that you've changed before provisioning. If you're ok with the changes to your system, click Provision. Depending on the changes you made, this process may take a few minutes to complete. Once you've received a confirmation that the configuration has been successfully provisioned, click Done.
Use the cPanel MultiPHP Manager to change PHP versions (EasyApache 4)
cPanel allows for PHP versions to be changed within both WHM and individual cPanel user accounts. This feature is only available when using EasyApache 4.
For all cPanel user accounts
1. To change the PHP version for cPanel accounts, log into WHM and click on the Software panel. You may also use these instructions from within individual cPanel accounts, but you will not be able to change the PHP version for domains that are not assigned to that account.
2. Click on MultiPHP Manager. This will open a new menu which allows you to set both the system default PHP version, and control PHP versions on a per-domain basis.
- WHM only: To change the default version of PHP that all cPanel servers are provisioned with, select a version under System PHP Version and click Apply.
- WHM/cPanel: To change PHP versions on a per domain basis, select the domain you'd like to change and use the dropdown menu on the right to determine the PHP version, then click Apply.
3. You should now be using your assigned version of PHP. Verify that your version is correct and working properly by creating a PHP info page. If you need help, instructions can be found in this article.