WordPress: Server Doesn't Have ImageMagick or GD Installed/Enabled
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.
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.
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
- Enable GD and/or ImageMagick in php.ini:
- Restart the web server.
extension=gd
extension=imagick
Verify the Installation in WordPress
Once the libraries are installed:
- Go to the WordPress admin panel.
- Navigate to Media > Add New.
- Try uploading an image to check if resizing works correctly.
Shared Hosting Users
Troubleshooting
Library Installed but Not Working
- Check if the correct PHP version is being used:
php -v
php --ini
Fallback to GD
If ImageMagick is not available, WordPress can work with GD:
- Add the following to your
wp-config.phpto force WordPress to use GD:
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.
- Install ImageMagick or GD on your server.
- Restart the server to ensure the libraries are recognized by PHP.
- Verify the installation in WordPress by uploading an image.


