How to Install ImageMagick on a cPanel Server (Dedicated & VPS Only)
Important: These instructions apply only to root-level access servers such as Dedicated Servers and VPS environments. Shared hosting customers cannot install server-wide ImageMagick.
ImageMagick is a powerful command-line utility used for creating and editing images, often required by PHP applications such as WordPress, Magento, and various CMS platforms.
✔ Modern Recommended Installation Method (EasyApache 4)
Most modern cPanel servers running EasyApache 4 can install ImageMagick and PHP Imagick using YUM without downloading any custom scripts.
To install ImageMagick system-wide:
yum install ImageMagick ImageMagick-devel -y
To install the PHP Imagick extension (for all PHP versions available):
yum install ea-php74-php-pecl-imagick
yum install ea-php80-php-pecl-imagick
yum install ea-php81-php-pecl-imagick
yum install ea-php82-php-pecl-imagick
(Install only the versions you need based on your PHP setup.)
After installation, restart Apache:
service httpd restart
You can confirm installation using:
convert --version
php -m | grep imagick
⚠ Older Installation Method (Legacy / Deprecated)
The following method used to be common on older EasyApache 3 servers. It is mostly deprecated but kept here for historical reference.
mkdir /home/cpimins
cd /home/cpimins
wget http://layer1.cpanel.net/magick.tar.gz
tar zxvf magick.tar.gz
cd magick
/scripts/installrpm ImageMagick
/scripts/installrpm ImageMagick-devel
sh ./install
This method is no longer recommended because:
- EasyApache 3 is end-of-life
- The official cPanel download links are no longer maintained
- It may install outdated ImageMagick builds
Common Issues
- PHP script still cannot find ImageMagick – Ensure the Imagick PHP module is installed for the PHP version in use.
- convert command not found
– Run:
which convertto confirm the installation path. - WHM MultiPHP not picking up Imagick – Restart Apache + PHP-FPM after installation.
- PECL imagick build errors – Ensure ImageMagick-devel is installed before compiling.
Security Notes
- Always install ImageMagick from the official OS repository (YUM) for security patches.
- Avoid installing obsolete versions from untrusted sources.
- Keep cPanel, WHM, and EasyApache updated to ensure compatibility.