In this brief guide we will be going over how to install imagick for a cPanel(Centos) server. See here for more about imagick.

To install Imagick we first need to install the below required rpm packages as root.

yum install ImageMagick ImageMagick-devel -y

Now we install the PHP extensions for our desired PHP versions.

for version in $(ls /opt/cpanel|grep ea-php); do /opt/cpanel/${version}/root/usr/bin/pecl channel-update pecl.php.net; done;
for PHP in $(ls -h /opt/cpanel |grep ea-php); do printf '\n' |/opt/cpanel/$PHP/root/usr/bin/pecl install imagick; done

We now need to restart Apache httpd process.

service httpd restart

You should be all set now and be able to see the new extensions in phpinfo or when checking.

for phpver in $(ls -1 /opt/cpanel/ |grep ea-php | sed 's/ea-php//g') ; do echo "PHP $phpver" ; /opt/cpanel/ea-php$phpver/root/usr/bin/php -m |grep imagick; done

We sell high performance KVM VPS hosting which is perfect for hosting your own cPanel . So if your looking for shared hosting with this already enabled or a VPS we got you covered.

cPanelKVM VPS Hostinglinux