cPanel Intermediate

How to install ImageMagick and imagick on cPanel

By Angus Published 14 May 2026 4 min read

ImageMagick is a system-level image processing library, and the imagick PHP extension gives your PHP applications access to it. Many WordPress plugins and PHP scripts depend on imagick to resize, compress or convert images on the server.

You will install ImageMagick through EasyApache 4, then activate the imagick extension for each PHP version running on your server. Root WHM access is required for all steps in this guide.

Before you begin

  • Root access to WHM on a cPanel server is required. This guide does not apply to shared hosting accounts.
  • Your server must run EasyApache 4. EasyApache 3 is end-of-life and uses a different workflow.
  • We recommend noting which PHP versions are currently active before making changes. Check this in WHM > Software > MultiPHP Manager.

Install ImageMagick via EasyApache 4

EasyApache 4 manages PHP, Apache and their extensions on cPanel servers. You add imagick by customising your EasyApache profile, which installs the underlying ImageMagick system libraries and the PHP extension together.

  1. Log in to WHM.
    Access WHM at https://yourhostname:2087 and log in as root.
  2. Open EasyApache 4.
    In the left sidebar, go to Software and click EasyApache 4.
  3. Customise your current profile.
    Find your currently provisioned profile and click Customize.
  4. Add the imagick extension.
    Click PHP Extensions in the customisation sidebar. Search for imagick and toggle it on for each PHP version you need to support. EasyApache installs the ImageMagick system libraries as a dependency automatically.
  5. Review and provision.
    Click Review, confirm the package list, then click Provision. EasyApache rebuilds your PHP configuration with imagick included. This typically takes two to five minutes.

Once provisioning completes, imagick is available on the server. The next step activates it at the account level.

Activate imagick in MultiPHP Extensions Manager

After installing imagick via EasyApache, you activate it for cPanel accounts using the MultiPHP Extensions Manager. This makes the extension loadable by PHP processes on your server.

  1. Open MultiPHP Extensions Manager.
    In WHM, go to Software and click MultiPHP Extensions Manager.
  2. Select a PHP version.
    Choose a PHP version from the dropdown at the top of the page.
  3. Enable imagick.
    Search for imagick in the extensions list, tick the checkbox, and click Save.
  4. Repeat for each PHP version.
    Return to the dropdown and repeat the previous two steps for any other PHP versions in use on your server.

Verify the installation

Confirm imagick loaded correctly by checking the PHP configuration for a domain on your server.

  1. Create a phpinfo file.
    Follow our guide on creating and using a phpinfo file to generate a PHP information page for a domain on your server.
  2. Search for imagick.
    Open the phpinfo page in a browser and press Ctrl+F to find imagick. A section labelled imagick confirms the extension is active and shows its version alongside the ImageMagick version it links against.
  3. Remove the phpinfo file.
    Delete the file after confirming. Leaving phpinfo pages publicly accessible exposes server and PHP configuration details to anyone who visits the URL.

Troubleshooting

imagick does not appear in Extensions Manager

If imagick is missing from the MultiPHP Extensions Manager after provisioning, it may have been compiled manually using PECL rather than installed as an EA4 package. Extensions compiled via PECL are not registered with EasyApache and will not appear in the Extensions Manager list.

To load a PECL-compiled imagick extension, use MultiPHP INI Editor instead:

  • In WHM, go to Software and open MultiPHP INI Editor.
  • Select Editor Mode and choose your PHP version from the dropdown.
  • Add the line extension=imagick.so to the configuration and click Save.

EasyApache provisioning fails

If EasyApache returns a dependency error during provisioning, clear the YUM package cache on the server and try again. Connect via SSH and run:

yum clean all

Return to EasyApache 4 and reprovision. If the error persists, check WHM notifications for a specific dependency conflict message.

Wrapping up

You installed ImageMagick and activated the imagick PHP extension on your cPanel server using EasyApache 4 and the MultiPHP Extensions Manager. PHP applications on your server can now use imagick for image processing tasks.

If you need to change the PHP version a domain uses after this change, see our guide on changing your PHP version in cPanel. For other server configuration tasks, browse the VPS guides section.

Ready to get started?

Launch your website with our reliable cPanel hosting with unlimited bandwidth and expert support.

Get cPanel Hosting

Need a domain?

Find and register the perfect domain name for your website.

Search Domains