In this tutorial we will teach you how to install ImageMagick on cPanel using EasyApache 4.
ImageMagick is focused on helping you to create, edit, and convert bitmap images. It supports a variety of image formats and you can see the list of supported image formats here.
ImageMagick can be installed with a simple cPanel script, ‘/scripts/installimagemagick’, in the older version of cPanel. However, in later versions of cPanel, EasyApache 4 uses a different method to install it.
Here it the method below.
yum install ImageMagick-devel ImageMagick-c++-devel ImageMagick-perl
After the Installation is done, use the following command to confirm if it is working.
Install ImageMagick PHP extension on cPanel with EasyApache 4
/opt/cpanel/ea-php56/root/usr/bin/pecl install imagick
Append the ImageMagick extension into the PHP 5.6 configuration file to load the module.
- Paste the following into it:
- Restart the web server
service httpd restart
- Confirm the installation.
/opt/cpanel/ea-php56/root/usr/bin/php -m | grep imagick
If you would like to enable the ImageMagick PHP module on PHP 7.0, you will have to update the right binary paths on the installation above.
/opt/cpanel/ea-php56/root/usr/bin/pecl to /opt/cpanel/ea-php70/root/usr/bin/pecl
/opt/cpanel/ea-php56/root/etc/php.ini to /opt/cpanel/ea-php70/root/etc/php.ini
/opt/cpanel/ea-php56/root/usr/bin/php to /opt/cpanel/ea-php70/root/usr/bin/php
If you wish to enable the ImageMagick PHP module on different PHP versions on EasyApache 4, do so by changing the correct binary path.
This is all you have to do in order to install ImageMagick with cPanel