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

WordPress: Server Doesn't Have ImageMagick or GD Installed/Enabled

3 min read
11.11.2025

Error Explanation: The error message indicates that your server is missing ImageMagick or GD, two PHP libraries required by WordPress to handle image processing tasks like resizing, cropping, or generating thumbnails.

WordPress ImageMagick GD Error
WordPress image lib missing — install + enable + verify WP sees it.

For closely related WordPress and image library topics, see Install ImageMagick or GD — Admin Guide, Server Does Not Have ImageMagick or GD — How to Check, and DB_COLLATE in WordPress.

What Are ImageMagick and GD?

  • ImageMagick: A software suite for creating, editing, and converting images. Known for its advanced features and better performance than GD.
  • GD (Graphics Draw): A built-in PHP library for basic image manipulation tasks.

WordPress requires at least one of these libraries to handle media-related tasks.

Check If ImageMagick or GD Is Installed

Run the following PHP script to check for these libraries:

<?php

if (extension_loaded('gd')) {

    echo "GD is installed and enabled.\n";

} else {

    echo "GD is not installed.\n";

}



if (extension_loaded('imagick')) {

    echo "ImageMagick is installed and enabled.\n";

} else {

    echo "ImageMagick is not installed.\n";

}

?>

Save the file as check.php and access it via your browser or command line.

Linux VDS
High performance for your projects
  • Root access and flexible setup
  • Control panel
  • NVMe disks
  • DDR5
Linux VDS

Install ImageMagick or GD (for Server Administrators)

For Linux Servers

Install ImageMagick:

sudo apt update
sudo apt install imagemagick php-imagick -y
sudo systemctl restart apache2  # For Apache
sudo systemctl restart php7.x-fpm  # For Nginx with PHP-FPM

Install GD:

sudo apt update
sudo apt install php-gd -y
sudo systemctl restart apache2  # For Apache
sudo systemctl restart php7.x-fpm  # For Nginx with PHP-FPM

Verify Installation:

php -m | grep -E 'gd|imagick'

For Windows Servers

  1. Enable GD and/or ImageMagick in php.ini:
  2. extension=gd
    extension=imagick
  3. Restart the web server.

Verify the Installation in WordPress

Once the libraries are installed:

  1. Go to the WordPress admin panel.
  2. Navigate to Media > Add New.
  3. Try uploading an image to check if resizing works correctly.

Shared Hosting Users

If you are on shared hosting and cannot install these libraries yourself:

  1. Contact your hosting provider support team and request them to enable ImageMagick or GD for your account.
  2. Many hosting providers already have these libraries installed, but they may need to be enabled for your specific PHP version.

Troubleshooting

Library Installed but Not Working

  • Check if the correct PHP version is being used:
  • php -v
  • Ensure the correct PHP configuration is loaded:
  • php --ini
  • Restart the web server after installation.

Fallback to GD

If ImageMagick is not available, WordPress can work with GD:

  1. Add the following to your wp-config.php to force WordPress to use GD:
  2. define('WP_IMAGE_EDITORS', ['WP_Image_Editor_GD']);

Additional Tips

  • Performance: If possible, use ImageMagick, as it is more efficient and supports advanced features.
  • Hosting Compatibility: Before choosing a hosting provider, verify that they support these libraries.
  1. Install ImageMagick or GD on your server.
  2. Restart the server to ensure the libraries are recognized by PHP.
  3. Verify the installation in WordPress by uploading an image.
Frequently asked questions
`apt install imagemagick php-imagick php-gd` (covers both libraries). Then restart PHP-FPM: `systemctl restart php8.1-fpm` (adjust PHP version). Reload WordPress upload screen — error should be gone. Two libraries installed simultaneously is fine; WP picks imagick if available.
Wrong PHP SAPI. CLI saw extension; web SAPI (PHP-FPM) doesn't. Verify with phpinfo() page served from WordPress — search for imagick or gd section. If absent: extension didn't load for FPM. Check `/etc/php//fpm/conf.d/` for imagick.ini and gd.ini symlinks. Restart FPM.
cPanel: "Select PHP Version" → Extensions → tick imagick or gd. Then save. Plesk: similar UI under PHP Settings. DirectAdmin: depends on host config. If panel doesn't show the extension as an option, host hasn't installed system-wide; file ticket. Some budget hosts refuse.
Modern ImageMagick ships with restrictive policy.xml — blocks PDF, EPS, certain SVG features for security. WordPress image processing may fail with cryptic error if hitting a blocked format. Check `/etc/ImageMagick-*/policy.xml`. Loosen as needed (carefully, with security implications) by commenting out restrictive `` lines.
Related articles
Install ImageMagick or GD — Server Administrator's Guide
Fix: "0 Databases Allowed" Error in Hosting Plan
MySQL Error #1227: Access Denied — You Need (at Least One of) the SUPER Privilege(s)