Fatal error: Class 'imagick' not found

You might be having mis-aligned library versions.

Here's how I solved it

I had really struggled with all these answers. Looking back I realised most of them are correct except they leave out some very fine details that are crucial.

1). First and foremost, before you start downloading any libraries or DLLs you want to start with your php_info to find out these three very important parameters.

Run the PHP_Info and check:

  1. Architecture : x86 or x64. Your computer might be x64 but your php is running on x86 so don't assume
  2. Thread Safety : yes or no. Also very important.
  3. Your PHP Version

2). Download ImageMagick from: https://windows.php.net/downloads/pecl/deps/. My computer is x64 but my php is running x86 so I downloaded ImageMagick-7.0.--vc*-x86.zip

3). Unzip and copy all DLLs from the unzipped bin subfolder to the Apache bin directory. It's a bunch of CORE_RL_.dll and IM_MOD_RL_.dll plus a few other DLLs. In my case, [zippeddownload]/bin/* ->copied to -> C:\Xampp\apache\bin

4). Go to http://pecl.php.net/package/imagick. You can select the zip link or just the DLL link. I prefer the DLL link. In my case I selected latest version 3.4.3. Which then took me to https://pecl.php.net/package/imagick/3.4.3/windows. Here we have to make another careful choice

  1. My php version is PHP 5.6
  2. Thread Safety is enabled
  3. Architecture php is running on is x86
  4. So I took 5.6 Thread Safe (TS) x86

5). Unzip and copy "php_imagick.dll" to the php ext folder. And all other DLL files to the php folder

6). Using an editor open php.ini. Search for "extension=" and add this line extension=php_imagick.dll as one of them.

7). Restart Xampp/Wamp or just restart Apache and run PHP_INFO again. Imagick should display. If you still can't see it refer to this link http://php.net/manual/en/imagick.setup.php#119084

Bonus tip: You might need to download visual c++ 14 runtime. From this link https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads I chose the latest version.


  • Try: php -m | grep imagick.
  • If the result is empty do: sudo apt-get remove --purge php5-imagick && sudo apt-get install php5-imagick

Regards