How to Install ImageMagick on cPanel WHM Server


Install ImageMagick on cPanel WHM server

This article provides a guide for how to install ImageMagick on cPanel WHM server. This guide is intended for root-level cPanel VPS or cPanel Dedicated Server administrator.

What is ImageMagick?

ImageMagick is a free and open-source cross-platform software suite for displaying, creating, converting, modifying, and editing raster images.

Since 1987, ImageMagick has become a signature open-source image-editing software, used as both a stand-alone project as well as an ancillary package, bundled with other popular softwares. As such, the ImageMagick package is considered a dependency of many common website softwares, such as WordPress and WHMCS. Therefore, it may be helpful to install on cPanel WHM servers.

Install ImageMagick on cPanel WHM Server

To install ImageMagick to a cPanel/WHM server, perform the following steps.

  1. SSH the server as root user
  2. Run the following command to install the ImageMagick packages from RPM:
    yum install ImageMagick ImageMagick-devel -y
  3. Find the binaries for PECL for all versions of PHP that you have installed:
    find /opt/cpanel/ -iname pecl | grep bin
  4. Check the output to confirm PECL binaries of the cPanel installation:
    root@cpanel [~]# find /opt/cpanel/ -iname pecl | grep bin
    /opt/cpanel/ea-php71/root/usr/bin/pecl
    /opt/cpanel/ea-php72/root/usr/bin/pecl
    /opt/cpanel/ea-php73/root/usr/bin/pecl
    /opt/cpanel/ea-php74/root/usr/bin/pecl
    /opt/cpanel/ea-php80/root/usr/bin/pecl
    /opt/cpanel/ea-php81/root/usr/bin/pecl
    root@cpanel [~]#
    where ea-phpXX represents the installed PHP versions.
  5. For each PHP version, run the following command (modify the commands for the PHP versions):
    /opt/cpanel/ea-phpXX/root/usr/bin/pecl install imagick
  6. Example commands:
    /opt/cpanel/ea-php71/root/usr/bin/pecl install imagick
    /opt/cpanel/ea-php72/root/usr/bin/pecl install imagick
    /opt/cpanel/ea-php73/root/usr/bin/pecl install imagick
    /opt/cpanel/ea-php74/root/usr/bin/pecl install imagick
    /opt/cpanel/ea-php80/root/usr/bin/pecl install imagick
    /opt/cpanel/ea-php81/root/usr/bin/pecl install imagick
  7. After each command, confirm the prefix of ImageMagick installation (enter "Return" to use default):
    Please provide the prefix of ImageMagick installation [autodetect] :
  8. Repeat for each PHP version

Conclusion

You have now installed ImageMagick on cPanel WHM server. If you face any difficulties, please contact our support team for assistance.

  • imagemagick
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Create an Account in WHM

This article discusses the process of creating a hosting account in WHM. Creating an Account...

WHM Hosting Package Extensions

Introduction Package extensions add custom fields to packages and accounts. These fields can...

Remove a Service from ChkServd Monitoring for cPanel Servers

This guide requires root user account in server. In some circumstances, ChkservD cPanel...

Assigning a Dedicated IP Address to a Subdomain using WHM

To assign a dedicated IP address to a subdomain, perform the following steps: Step 1: Add the...

Install cPanel DNSONLY on CentOS 7

This article provides a guide for installing cPanel DNSONLY on CentOS 7. cPanel DNSONLY allows...