- Plesk for Linux
How to install the php-mcrypt module on a Plesk server?
Notes: The solution in this article is applicable to system PHP versions (Up to 7.1) supplied by OS vendor.
Plesk PHP handlers up to 7.1 are shipped with the mcrypt module by default. PHP handlers provided by Plesk can be installed via Plesk Installer and selected at Domains > example.com > PHP settings.
The mcrypt module is deprecated since PHP 7.1 and is moved out from core into PECL:
PHP RFC: Deprecate (then Remove) Mcrypt
PHP: Deprecated features in PHP 7.1.x
Connect to a Plesk server via SSH.
Install the module:
on CentOS/RHEL-based distributions:
# yum install epel-release
# yum install php-mcrypt
on Debian/Ubuntu-based distributions:
Find the system PHP version:
# php -v
Run the command:
if PHP 5.x version is installed:
# apt-get install php5-mcrypt
if PHP 7.x version is installed:
# apt-get install php-mcrypt
To make the mcrypt extension available for existing websites, update PHP settings for all domains with the command:
# /usr/local/psa/bin/php_settings -u
This extension will also appear in Plesk at Tools & Settings > PHP Settings > [php] by OS vendor.