Era Host hosting
EraHost – Free Domain, Cheap Hosting!
Client Area
Support 24/7
Menu

Server Does Not Have ImageMagick or GD Installed — How to Check

3 min read
23.04.2026

To determine if ImageMagick or GD is installed and enabled on your server, follow these steps.

Check If ImageMagick or GD Is Installed on Your Server
ImageMagick vs GD — what your CMS needs and how to detect them.

For installing ImageMagick / GD if the check below confirms they're missing, see Install ImageMagick or GD — Server Administrator's Guide.

Using PHP Script

Create a File

Name it something like check-imagemagick-gd.php and add the following code:

<?php

echo "Checking PHP extensions...<br>";



// Check for GD

if (extension_loaded('gd')) {

    echo "GD is installed and enabled.<br>";

} else {

    echo "GD is not installed.<br>";

}



// Check for ImageMagick

if (extension_loaded('imagick')) {

    echo "ImageMagick is installed and enabled.<br>";

} else {

    echo "ImageMagick is not installed.<br>";

}



phpinfo();

?>

Upload the File

Upload it to your server (e.g., via FTP or cPanel File Manager) in the web-accessible directory.

Run the Script

Access it in your browser:

http://yourdomain.com/check-imagemagick-gd.php

The script will display whether GD and/or ImageMagick are installed and enabled.

Remove the Script After Testing

For security reasons, delete the check-imagemagick-gd.php file once you are done.

Using Command Line

Check GD Module:

Run the following command to see if GD is installed:

php -m | grep gd

If gd appears in the output, it is installed.

Check ImageMagick Module:

Run the following command to check for ImageMagick:

php -m | grep imagick

If imagick appears in the output, it is installed.

Check via phpinfo()

  1. Create a new PHP file named phpinfo.php with the following code:
  2. <?php
    phpinfo();
    ?>
  3. Access the file in your browser:
  4. http://yourdomain.com/phpinfo.php
  5. Look for:
    • gd section: Check if GD is enabled and displays details like GD Version.
    • imagick section: Check if ImageMagick is listed with its version.
  6. Remove the phpinfo.php file after testing.
Linux VDS
High performance for your projects
  • Root access and flexible setup
  • Control panel
  • NVMe disks
  • DDR5
Linux VDS

Check the Installed Packages (Linux Servers)

For ImageMagick:

Run:

convert --version

If installed, it will display the ImageMagick version.

For GD:

GD is included in the PHP package. To confirm:

php -i | grep -i gd

Next Steps

If GD or ImageMagick is not installed, you will need to install and enable them. Here are the installation commands for Ubuntu/Debian:

Install GD:

sudo apt update
sudo apt install php-gd
sudo systemctl restart apache2

Install ImageMagick:

sudo apt update
sudo apt install imagemagick php-imagick
sudo systemctl restart apache2

After installation, rerun the checks to verify that the extensions are now enabled.

Frequently asked questions
ImageMagick is more feature-rich and supports more formats (PSD, TIFF, animated WebP); GD is lighter and built into many PHP packages by default. For WordPress/PrestaShop/Magento, ImageMagick produces better thumbnails. For tight VPS resources or simple resize use cases, GD is enough. Most production setups install both and let the application pick.
The ImageMagick CLI binary and the PHP extension are separate packages. The shell tool comes from `imagemagick`; PHP integration comes from `php-imagick` / `php8.x-imagick`. Install the PHP extension separately: `apt install php-imagick && systemctl restart php-fpm`. Verify via `php -m | grep imagick`.
Different SAPI. phpinfo() in browser is web SAPI; the CMS background job (cron, queue worker) might be running CLI SAPI with a different php.ini and module set. Run `php -m` and `php-cli -m` separately to compare. CLI often has fewer extensions enabled.
No. ImageMagick is a system-level library; installation requires root. On shared hosting, file a ticket with your provider asking them to enable the PHP imagick extension. Most providers have it available as a per-account toggle in cPanel/DirectAdmin/ISPmanager — sometimes you can flip it yourself in "Select PHP Version" → "Extensions".
Related articles
WordPress: Server Doesn't Have ImageMagick or GD Installed/Enabled
Install ImageMagick or GD — Server Administrator's Guide
Fix "Your PHP Version Does Not Meet the Bitrix Requirements" Error