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.

printf '\n' | /opt/cpanel/ea-php70/root/usr/bin/pecl install imagick
printf '\n' | /opt/cpanel/ea-php71/root/usr/bin/pecl install imagick
printf '\n' | /opt/cpanel/ea-php72/root/usr/bin/pecl install imagick
printf '\n' | /opt/cpanel/ea-php73/root/usr/bin/pecl install imagick

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

Leave a Reply