Background
At times WHM hosted WordPress sites may complain when checking security.
“Some modules are not installed”
The list typically looks like this:
- exif
- fileinfo
imagick
- intl
Numbers 1,2, and 4 are easy to install with EasyApache 4 on a WHM server.
The problem is imagick
simply doesn’t appear on the list. So what now?
There are two ways to do this, and two operating systems to consider as of 2023.
- AlmaLinux
- Ubuntu
AlmaLinux
The information for AlmaLinux can be found in this article, but for the busy administrator we’ve just extracted the actual commands.
dnf config-manager --set-enabled epel dnf install ImageMagick ImageMagick-devel -y find /opt/cpanel/ -iname pecl | grep bin /opt/cpanel/ea-php74/root/usr/bin/pecl install imagick /opt/cpanel/ea-php80/root/usr/bin/pecl install imagick /opt/cpanel/ea-php81/root/usr/bin/pecl install imagick
Ubuntu
For Ubuntu we’ve copied some information from above article verbatim
EA-PHP Extension via WHM
- Log in to WHM as the root user.
- Navigate to “Home » Software » Module Installers”
- Click on the Manage link to the right of “PHP Pecl.“
- Select your desired version of PHP from the drop-down menu, and click “Apply.“
- Under “Install a PHP Pecl,” enter “imagick” (without the quotes).
- Click “Install Now.“
- If the server’s operating system is CloudLinux, update CageFS by navigating to: “Home » Plugins » CageFS User Manager”
- Then click on the “Update CageFS Skeleton” button on the bottom right
- If PHP-FPM is used this service must also be restarted
/scripts/restartsrv_apache_php_fpm
Good luck! May your WordPress instances always be happy.