Knowledgebase

How to Install a PHP Extension in WHM?

The most important aspect of web hosting is keeping your server running smoothly and efficiently. One way to enhance your server’s capabilities is by installing PHP extensions. These handy modules expand PHP’s functionality, allowing you to do more with your scripts and applications. 

Whether you need to add support for image processing, improve database interactions, or enable internationalization, PHP extensions have you covered.

But how do you install a PHP extension in WHM? 

This guide will walk you through the process step-by-step. Let’s dive in and get those PHP extensions up and running!


Also Read: How to Whitelist an IP address in CSF from WHM?


Steps to Install a PHP Extension in WHM

➔ Login to WHM with your root username & password. 

Login to WHM

➔ Once you log in, locate the search bar on the left side of the WHM interface.

locate the search bar

➔ In the search bar, type ‘EasyApache 4.’

type EasyApache 4

➔ Click on the ‘EasyApache 4’ link from the search results under the ‘Software’ section.

Click on the EasyApache 4 link

➔ After clicking, you will enter the interface; click the ‘Customize’ button next to the profile you want to modify. This is typically the default profile unless you have created custom profiles.

click the ‘Customize’ button next

➔ You will see several sections on the left-hand side in the customization interface. Click on the ‘PHP Extensions’ section.

Click on the ‘PHP Extensions’ section

➔ A list of available PHP extensions will be displayed. Use the search bar to find the specific extension you want to install (e.g., zip, intl, mbstring, gd, etc).

specific extension you want to install

➔ To install an extension, you have to enable the extension next to it. If needed, you can select multiple extensions.

enable the extension next to it

➔ After selecting your desired extensions, click the ‘Review’ button at the bottom of the interface. (The Review page summarizes the changes to be made. You must ensure everything is correct.)

click the ‘Review’ button

➔ Click on the ‘Provision’ button at the bottom to apply the changes. EasyApache 4 will now install the selected PHP extensions. Please note that this process may take a few minutes.

Click on the Provision button


Also Read: How to Change PHP Version in cPanel?


This is how you can install PHP extensions in WHM using EasyApache 4. It involves customizing your PHP environment and provisioning the changes. With root access and a few clicks, you can enhance the functionality of your PHP installations to meet the needs of your web applications.