Install php 8 in cpanel

In an ongoing effort to bring you the best products and services, we will be upgrading our servers to PHP 8.0.

Why are we upgrading the PHP version?

In addition to new optimizations and features, PHP 8.0 provides improved data processing, which can boost your site’s speed and performance. You will also gain increased security. Newer versions of PHP have frequent security updates to protect against unwanted hacks and vulnerabilities.

When will the PHP 8.0 upgrade happen?

We will begin slowly rolling out PHP 8.0 to accounts starting early March 2022. 

Do I need to do anything on my end?

No, not currently, but we recommend that you take advantage of all the benefits that running the newest PHP version provides. Before making any changes to your account, make sure to back up all your website files. You will also want to confirm if your website application, plugins, themes, etc., can run on PHP 8.0 before updating to the newer PHP version or if those items need to be updated, as well.

Important Note: You should back up all of your website files before performing the PHP version upgrade of your web installations.

Once PHP 8.0 is available on your current server, you can set your site to use PHP 8.0 by following the instructions in this article: How to Update the PHP Version.

If you wish to learn more about the available PHP versions on our servers, you can check this helpful guide What Version of PHP Are You Using?

What if the recent version of PHP doesn't work on my site?

We’ve put together a list of fixes for the most common errors. Please see the following articles for more information.

  • How to Fix Error After MultiPHP Update
  • How to Update the PHP Version

If you need help with these changes, please reach out to us via phone or Live Chat to assist you.

December 2, 2020 – PHP 8 can be installed from EasyApache 4

November 26, 2020 – PHP 8 was released today: The PHP development team announces the immediate availability of PHP 8.0.0. This release marks the latest major release of the PHP language.

November 23, 2020 – cPanel ea-php80 updated to RC4

November 19, 2020 – latest release candidate RC5 is out. The GA version should be available in a few days.

As of today, October 29, 2020, PHP 8 is not yet available on the main EasyApache4 repository.

Install php 8 in cpanel

For the moment you can use PHP 8 (alpha version from July 2020 – ea-php80) on a cPanel server only by installing the EasyApache Experimental Repository. For more details about the changes in this repository check EasyApache Experimental Repository Change Log

To install the Experimental Repository, use:

# yum install ea4-experimental

The latest available PHP version on php.net site is PHP 8.0.0 Release Candidate 3 which was released on October 29, 2020. According to the PHP 8 Wiki page, the GA version is expected to be released on November 26, 2020.

Resources:
cPanel Experimental Repository Change Log
PHP 8 Wiki Site

PHP 7.2 reached end of life (EOL) in January 2021 and PHP 8 is available now. The major changes of this new PHP version affect many of the most popular PHP-based content management systems (CMSs) and overall LAMP-stack server security as features have been heavily revised for better security and performance. it’s important to know how to maintain up-to-date PHP versions on your cPanel VPS or dedicated server with WebHost Manager (WHM).

Below we cover how to:

  • Ensure cPanel is Updated
  • Install New PHP versions with EasyApache4

Ensure cPanel is Updated

Before continuing to install PHP versions:

  1. Ensure cPanel is up to date. You can update cPanel via SSH or log into WHM as root to check for an update notification in the upper-right corner.
  2. Ensure EasyApache4 is installed by searching for it on the left side of WHM. If not, or you have EasyApache3 instead, install EasyApache4.
  3. Create a server snapshot in your Account Management Panel (AMP).

Install PHP Versions with EasyApache4

Install php 8 in cpanel
Click to enlarge this screenshot image.

  1. Log into WHM as root.
  2. On the left, search for and select EasyApache4.
  3. At the top, select Customize to edit your current server configuration.
  4. On the left, select PHP Versions.
  5. Uninstalled PHP versions will have a gray slider on the right side. Installed PHP versions will have a blue slider. To install a new PHP version, select the slider for the new PHP version(s) you want to install so it turns blue.

    You should uninstall old PHP versions that have reached end-of-life (PHP 7.3 and older as of January 2021). However, before doing so, you must ensure the older PHP versions aren’t currently used by any web applications on your server before removing them. If you’re unsure about this, install the newest PHP version first. Then test all websites and applications in your server environment to ensure there are no compatibility issues. Afterwards, remove the older PHP version(s).

  6. Select Next to make further changes within EA4 until you reach the Review section. If you don’t need to make any other changes besides install PHP versions, simply select Review on the left.
  7. Review the pending changes. Once you’re sure of the changes you want to make, select Provision at the bottom.
  8. Select Done.

Congratulations, now you know how to install PHP versions using EasyApache 4. Check out our guide if you are seeing the Fatal Error: Class ‘PDO’ Not Found message on your site after updgrading.

Looking for ways to ensure your cPanel VPS or Dedicated Server is secure? Check out our guide on how to harden managed VPS Hosting. Or learn more about managing cPanel accounts in our Managed VPS Hosting Product Guide.

How can I install PHP version in cPanel?

Change the PHP Version on Your Sites.
Login to cPanel..
Click the MultiPHP Manager link in the Software section of cPanel..
Check the box for the site or sites you wish to update..
Select the desired PHP Version from the drop-down menu..
Click the Apply button..

How do I download and install PHP 8?

In this shot, we will go through the following three steps to install PHP 8 on windows:.
Step 1: Get the PHP files and extract them..
Step 2: Configure the php. ini ..
Step 3: Add PHP to the path environment variable..

How do I upgrade PHP to 8?

PHP Packages..
Uninstall/Remove PHP 7.x and Extensions..
Autoclean and Autoremove..
Add Ondřej Surý's PPA repository..
Install PHP 8..
Install PHP 8 Extensions..
Check PHP version..

How do I install PHP 8 on Apache?

Install and Configure PHP as an Apache Module.
Install the default php package. sudo apt install php..
(Optional) Install any other PHP packages that might be required. The php-mysql package is required to run WordPress. ... .
Confirm PHP 8.0 is installed..