How to get IMAGICK working under Windows Server IIS
Here is the simple method to get IMAGICK working under Windows Server 2019/2022 and IIS 10.0 and later.
- Presuming using PHP 7.4.X (current version is 7.4.27 as of 2/14/22). NOTE: This is not working properly under PHP 8.x
- Make sure you’ve downloaded the most current 7.4.X version and installed it on your IIS/PHP Manager, which properly sets up the handler mappings.
- download IMAGICK
- https://windows.php.net/downloads/pecl/releases/imagick/
- Pick the most current, NON “RC” version. For me, that was 3.7.0
- Download the version for PHP 7.4, NTS, vc15, x64
- For me, that was -> php_imagick-3.7.0-7.4-nts-vc15-x64.zip
- Make sure you have the Visual C 15 runtime installed. (Google it and download/install if needed)
- Extract the archive above to a temporary directory
- copy php_imagick.dll to your PHP\ext directory.
- MAKE SURE you are in the correct directory, e.g. for me that was php-7.4.27-nts-Win32-vc15-x64\ext
- in the archive directory, SORT BY TYPE.
- Copy all CORE_RL*.DLL (28 files)
- Copy all FILTER*.DLL (one)
- Copy all IM_MOD_RL (134 files)
- copy all these to your PHP version’s ROOT directory. For me, that was 7.4.27-nts-Win32-vc15-x64 (NOT THE EXT DIRECTORY!)
- Go to PHP manager and click on check PHPINFO(). When that comes up, scroll down and make sure you see a section for IMAGICK.
- Note: If you are using WordPress, please read this post to make sure you don’t get JSON errors.