# To install imagemagick on cPanel server you need to enter below commands on shell
yum -y install ImageMagick-devel ImageMagick-c++-devel ImageMagick-perl
# Now we need to install imagemagick PHP extensions for PHP versions 5.4, 5.5, 5.6, 7.0 and 7.1
for phpver in $(ls -1 /opt/cpanel/ |grep ea-php | sed ‘s/ea-php//g’) ; do
printf “\autodetect” | /opt/cpanel/ea-php$phpver/root/usr/bin/pecl install imagick
echo ‘extension=imagick.so’ >> /opt/cpanel/ea-php$phpver/root/etc/php.d/imagick.ini
done
/scripts/restartsrv_httpd
/scripts/restartsrv_apache_php_fpm
Please do contact us at [email protected] if you require any further assistance.