cPanel & WHM

cPanel & WHM

Getting Started

cPanel is a web hosting control panel (software that facilitates the management of a web hosting server) developed by cPanel, L.L.C., an American corporation. The software provides a graphical interface (GUI) and automation tools designed to simplify the process of hosting a website to the website owner or the “end-user”. WHM (Web Host Manager) is a control dashboard that will make it easier for users to manage various cPanel-based sites.

MultiPHP Manager for cPanel

Have you ever had a website with a different PHP version? Of course, you have. For example, website A uses PHP version 5.6, and website B must be deployed using PHP version 7.2. Well, this is quite inconvenient when you only have 1 hosting. In the past, 1 hosting could only support 1 PHP version. But now you can create MultiPHP on all hosting you know! Want to know how to make MultiPHP on hosting, let’s follow the following guide.

What is MultiPHP?

MultiPHP is a feature where users can have multiple versions of PHP on the hosting.

Quoted from cPanel, MultiPHP is designed to meet the diverse needs of customers.

In the past, hosting could only be single PHP. If you only have 1 hosting, it means you can only use 1 PHP version. So, for example, you have several subdomains and in that subdomain, there is a project that must use a different PHP version, you need to order hosting again. Because 1 hosting can only have 1 PHP version.

Now, all hosting plans can be multi PHP! With only 1 hosting, you can use several versions of cPanel for subdomains and addon domains. For example, suppose you have 1 hosting. And you have to upload several websites with the following conditions,

Website A
– Using subdomain multi1.domainname.com
– Using PHP version 5.6

Website B Website
– Using subdomain multi2.domainname.com
– Using PHP version 7.2

Let’s talk Multi PHP Manager!

The MultiPHP Manager interface allows you to easily manage the PHP and PHP-FPM configurations of your cPanel accounts and domains and is available for systems running EasyApache 4. There are quite a few different features that the MultiPHP Manager interface provides, including:

  • Hosting providers can switch between a number of different PHP versions with the click of a button, or allow more advanced users to upgrade to a newer version of PHP more quickly than others.
  • System Administrators can select the system’s PHP version (the global default PHP version for all accounts) and manage PHP-FPM configuration on each domain.
  • In EasyApache 4, each PHP version can be set to use a different PHP handler.
  • A systems administrator can manage the pool option of any virtual host they own.

Let’s get a little more in-depth into these features!

System PHP Version

system PHP version

The system PHP version refers to the version of PHP that functions as the global default for all accounts. Only the system administrator can set the system PHP version. Any primary domain that is set to Inherit uses the system PHP version. For more information, read our PHP Inheritance documentation.

PHP-FPM

CapturePHP FastCGI Process Manager (PHP-FPM)

PHP FastCGI Process Manager (PHP-FPM) is an alternative PHP module that allows a website to handle strenuous loads on sites. PHP-FPM maintains pools (workers that respond to PHP requests) to accomplish this. These pools of workers allow the website to handle more requests than it normally could.

List of domains

The list of domains displays the following information:

  • The name of the domain.
  • The PHP version that the domain currently uses.

Note:
In EasyApache 4, each domain or virtual host can use any currently-installed PHP version or currently-installed PHP-FPM setting.

  • The Inherited label, if the domain inherits its PHP version from the System PHP version.
  • A PHP-FPM enabled (√) or disabled (Ø) indicator.

Note:
Parked domains represent aliases for a primary domain. The system does not list parked domains.
System administrators can enable or disable PHP-FPM through WHM’s MultiPHP Manager interface (WHM >> Home >> Software >> MultiPHP Manager).

Use the Search text box to search domains by domain name or account name.

Set the PHP version for a domain

Note:
EasyApache 4 supports PHP versions 5.4 through 5.6, PHP versions 7.0 through 7.4, and PHP 8.0. The cPanel default profile includes PHP versions 7.3, 7.4, and 8.0.

To change a domain’s PHP version, perform the following steps:

  1. Select the checkbox for the domain that you wish to change.
  2. Select the desired version of PHP from the PHP Version menu. To always use the system default, select inherit.

    Note:
    If the system administrator recommends any PHP versions, the menu will display the Recommended label next to them.If you set your PHP version to inherit, the system will not allow you to set PHP-FPM. You must select a PHP version other than inherit to enable PHP-FPM on a domain. If the PHP version that you want to use does not appear, that PHP version is either not installed on the server or is not available for your account.

    If your system administrator limited your domain’s PHP version, then you cannot use this interface to restore the domain’s PHP version to its original version.

  3. Click Apply. The system will change the selected domain’s PHP version.

    Note:
    When you change the PHP version for your domain and FPM is enabled, the system changes your FPM version to match the PHP version. If FPM is not enabled on your domain, the system changes the PHP and FPM versions separately.

    If you enable FPM on your primary domain and then change that domain’s name, the system will disable FPM for the new domain. Your system administrator or hosting provider must reenable FPM on the new domain if you wish to use FPM for the new domain.

Easy Apache 4

EasyApache 4 is a tool that performs a thorough examination of how your WHM and CPanel maintain Apache and PHP versions.

EasyApache 4 is useful for installing, configuring, updating and validating web servers, PHP, and several other components on your website. In general, EasyApache 4 makes the sysadmin environment more friendly.

How to Upgrade PHP using EasyApache 4

You can easily upgrade or update your server’s version of PHP using the EasyApache 4 tool in WHM (Web Host Manager).

In this tutorial, we will show walk you through the update/upgrade steps. If you came here from our article on how to pass PCI compliance scans, outdated versions of PHP are a common thing that can cause your website to fail a PCI scan.

So understanding how to update PHP on your own using EasyApache in WHM is great knowledge to have in order to help keep your website PCI compliant.

Step 1. Log into WHM as the “root” user.

Step 2. In the search box type “easy” then click the EasyApache 4 option.

Log into WHM

Step 3. Click the Customize button next to Currently Installed Packages

Customize button next to Currently Installed Packages

Step 4. Click the PHP Versions link.

Click the PHP Versions link

You will then see your installed packages listed. If a PHP version is updatable it will have an Update switch already turned on.

Update switch already turned on

There is no need to adjust this setting to update that PHP version.

Step 5. To install additional PHP versions, click the slider next to the options. In this example, I am installing PHP 7.1.

install additional PHP versions

Step 6. Click the Review button once you have chosen which packages to update/install.

Review button once you have chosen which packages

You will then see a message stating “Preparing selected packages for review …” This may take several minutes to complete.

Step 7.  The Review page will list all the changes you are about to make. Scroll to the bottom, and click the Provision button to proceed.

Provision

The provision process will then begin. This may take several minutes to complete.

provision process

Step 8. You are finished when you see a message stating “The provision process is complete.” Click the Done button to return to the main EasyApache 4 page.

The provision process is complete

Congratulations, now you know how to update and upgrade the PHP version on your server!

Reference

Sharing is caring

© 2022 All Rights Reserved by Artistudio

Website problem, contact us!