How to install the PHP intl PECL module on a cPanel server

  WHM

Introduction

The PHP intl extension provides internationalisation features for PHP applications, including locale-aware formatting, date and time handling, character conversion, and language support. Although the PECL version of the intl module is no longer maintained, cPanel provides EasyApache 4 RPM packages that can be installed through WHM or via the command line.


Prerequisites

  • Root access to WHM
  • EasyApache 4 is installed on the server
  • Internet connectivity for package installation

Implementation

Install Using WHM

Step 1

Log in to WHM and navigate to EasyApache 4.

Click Customize next to Currently Installed Packages.


Step 2

Select PHP extensions and search for the following:

intl


Step 3

Enable the intl extension for the required PHP version(s).


Step 4

Click Review.


Step 5

Scroll to the bottom of the page and click Provision to install the selected EasyApache 4 RPM packages.


Install Using SSH

Step 1

Access the server through Terminal in WHM or connect via SSH as the root user.


Step 2

Install the intl extension package for the required PHP version.

Syntax:

yum -y install ea-php?? -php-intl

Replace?? with the desired PHP version.

Example for PHP 7.4:

yum -y install ea-php74-php-intl


Conclusion

The PHP intl extension can be easily installed on a cPanel server using EasyApache 4 via WHM or the yum package manager. Using the EasyApache 4 RPM packages is the recommended method, as the original PECL version is no longer maintained.

LEAVE A COMMENT