How to Upgrade PHP in cPanel
PHP is a programming language that can run with Apache or Microsoft IIS and works with your server to execute your website requests. Each PHP version gets active support for two years when reported bugs and security issues are fixed and shipped in regular point releases. In the third year, users only get critical security updates. Releases during this period are on an as-needed basis.
While updates to software often affect existing code, regularly checking and updating your PHP version is critical to the security of your websites and applications. This tutorial walks you through how to update the cPanel PHP version.
Prerequisites
- A server running cPanel with root access.
- Login credentials for cPanel.
- Create a cPanel backup of your site.
- Install appropriate PHP versions in WHM via EasyApache.
Upgrade PHP in cPanel
Step 1: Access cPanel
Login to cPanel.
Step 2: Check PHP Version
Before performing the update, start by checking the PHP version. Click Terminal under the Advanced section to access the terminal in cPanel.
Once you have read and understood the warning message, click I understand and want to proceed.
A terminal session begins inside the window.
Run the following command to check the PHP version.
php --version
The output shows the PHP version.
Step 3: Update PHP Version in cPanel
From the home screen, under the Software section, click MultiPHP Manager.
The MultiPHP Manager screen also shows your server’s default PHP version. It is set via WHM by your system administrator. To update the PHP version in cPanel for a specific domain, click the checkbox next to that domain, then select the appropriate version from the dropdown menu next to PHP Version. Click Apply to apply the change.
A green confirmation message appears in the upper right corner of the window.
The PHP version also updates under PHP Versions for the specified domain.
Wrapping Up
Software versions don’t last forever. Security updates, new features, and bug fixes get pushed out frequently. Knowing how to update the PHP version in cPanel helps users and administrators ensure they avoid End-of-Life (EOL) software.
Liquid Web customers get 24/7/365 support for these and many other functions in cPanel for our VPS Hosting, Cloud Dedicated Servers, and Dedicated Servers. Contact our sales team today if you want world-class hosting supported by Helpful Humans.