How to install PHP 7.4 mcrypt module in Cpanel Server

mcrypt is a PHP module, that was DEPRECATED in PHP 7.1.0, and REMOVED in PHP 7.2.0. mcrypt is removed from PHP, now it is available as a PECL module at

To install mcrypt on Cpanel Server, first, install libmcrypt-devel package with yum

yum install -y libmcrypt-devel

To install the module with PHP 7.4, run

/opt/cpanel/ea-php74/root/bin/pecl install mcrypt-1.0.5

After installation, you can verify from command line with

# /opt/cpanel/ea-php74/root/bin/php -m | grep mcrypt

If you want to install with another PHP version, change ea-php74 with your PHP version.

After installing, restart Apache and php-fpm service


To verify, create a phpinfo() file on your website. Go to the URL, and search for mcrypt on the page. You will see

PHP 7.4 mcrypt install

Back to Cpanel Server

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *