Last Revised: October 2, 2021
If in your WordPress Site Health dashboard you see the message The optional module, mcrypt, is not installed, or has been disabled, you have the possibility to correct it with some changes.
The optional module, mcrypt, is not installed, or has been disabled.
The optional module, mcrypt, is not installed, or has been disabled.
Alternative extension
The mcrypt extension should only be required if you do not have the possibility to install the libsodium extension.
- Alternative extension
- Shared Hosting
- VPS / Dedicated
- cPanel Control Panel
- Panel de control Plesk
- About this document
Shared Hosting
In case you have your website with WordPress on a shared hosting, you will need to contact your provider and ask them to activate the PHP mcrypt extension.
VPS / Dedicated
If you have access to your VPS or dedicated server, you will need to install the PHP mcrypt extension. From PHP 7.2 the use of libsodium is preferable.
Ubuntu / Debian
apt install php-mcrypt
CentOS / RHEL
yum install php-mcrypt
cPanel Control Panel
First we will have to install the libmcrypt library.
yum -y install epel-release
yum install --enablerepo=epel -y gcc libmcrypt-devel make
In the Software / Module Installer section, we have the PHP PECL section.

There we will go to the management and select the version of PHP that we want to configure. If we want to have it in all versions, we must do the steps for each of them.
In the “Install a PHP PECL” section, put “mcrypt” and click on “Install”.

At the end we will have “mcrypt in the list of extensions of that version of PHP.

Panel de control Plesk
PHP < 7.1
If you have Plesk control panel (Service Provider View), you can install PHP mcrypt from the PHP Tools and Settings/ Settings section.
Once there, the corresponding PHP version is selected and inside the “mcrypt” option is activated.

PHP 7.2
Ubuntu / Debian
apt-y install plesk-php72-dev gcc libmcrypt-dev make
/opt/plesk/php/7.2/bin/pecl install mcrypt-1.0.1
echo 'extension=mcrypt.so' > /opt/plesk/php/7.2/etc/php.d/mcrypt.ini
plesk bin php_handler --reread
CentOS / RHEL
yum-y install epel-release
yum install --enablerepo=epel -y plesk-php72-devel gcc libmcrypt-devel make
/opt/plesk/php/7.2/bin/pecl install mcrypt-1.0.1
echo 'extension=mcrypt.so' > /opt/plesk/php/7.2/etc/php.d/mcrypt.ini
plesk bin php_handler --reread
PHP 7.3
Ubuntu / Debian
apt-y install plesk-php73-dev gcc libmcrypt-dev make
/opt/plesk/php/7.3/bin/pecl install mcrypt-1.0.2
echo 'extension=mcrypt.so' > /opt/plesk/php/7.3/etc/php.d/mcrypt.ini
plesk bin php_handler --reread
CentOS / RHEL
yum-y install epel-release
yum install --enablerepo=epel -y plesk-php73-devel gcc libmcrypt-devel make
/opt/plesk/php/7.3/bin/pecl install mcrypt-1.0.2
echo 'extension=mcrypt.so' > /opt/plesk/php/7.3/etc/php.d/mcrypt.ini
plesk bin php_handler --reread
PHP 7.4
Ubuntu / Debian
apt-y install plesk-php74-dev gcc libmcrypt-dev make
/opt/plesk/php/7.4/bin/pecl install mcrypt-1.0.4
echo 'extension=mcrypt.so' > /opt/plesk/php/7.4/etc/php.d/mcrypt.ini
plesk bin php_handler --reread
CentOS / RHEL
yum-y install epel-release
yum install --enablerepo=epel -y plesk-php74-devel gcc libmcrypt-devel make
/opt/plesk/php/7.4/bin/pecl install mcrypt-1.0.4
echo 'extension=mcrypt.so' > /opt/plesk/php/7.4/etc/php.d/mcrypt.ini
plesk bin php_handler --reread
About this document
This document is regulated by the EUPL v1.2 license, published in WP SysAdmin and created by Javier Casares. Please, if you use this content in your website, your presentation or any material you distribute, remember to mention this site or its author, and having to put the material you create under EUPL license.