How to install imagick in xampp/wampp in Windows

How to install imagick in xampp/wampp in Windows

  1. Blog
  2. 15 November 2026
  3. 4 min read

Stefan Bogdanescu

Founder & Senior Architect

How to Install Imagick in XAMPP/WAMP on Windows

Configuring ImageMagick within a WAMP or XAMPP environment on Windows often feels like chasing your tail. The PHP extension works differently than the CLI tool, requiring specific binary architectures and manual DLL registration. If you are hitting wall after wall of errors during installation, follow this structured approach to get the library up and running without breaking your Apache setup.

Verifying Architectures and Binaries

The first point of failure is almost always a mismatch between the PHP architecture and the ImageMagick binaries. XAMPP for Windows typically ships with an x86 (32-bit) PHP build. You must ensure your ImageMagick installation matches this exactly. If you downloaded a 64-bit version, the loader will fail immediately.

Navigate to the official releases page at https://imagemagick.org/script/binary-releases.php#windows and download the Win32 dynamic at 16 bits-per-pixel package. This specific build ensures compatibility with the standard 32-bit PHP environments found in most local server stacks.

Installing the PHP Extension

Next, retrieve the PHP extension itself. Visit the PECL repository for the latest stable version of Imagick. When downloading, you must select the 5.x Thread Safe (TS) x86 build. The x86 designation here is critical; it corresponds to your PHP version's architecture, not just the operating system.

Once downloaded, extract the files and locate the php_imagick.dll. Move this file into the php/ext folder of your XAMPP installation. Then, open your php.ini configuration file and add the following line:

extension=php_imagick.dll

Restart your Apache server to apply these changes. If you see a generic "module not found" error, you are on the right track; the issue is likely deeper within the ImageMagick library itself.

Resolving CORE_RL Entries

A common stumbling block occurs when running php in the console or accessing the Imagick module via Apache. You might encounter an error stating: Unable to find the entry point for the procedure FlattenImages in the DLL CORE_RL_magick.dll.

This indicates that the PHP extension has loaded, but it cannot resolve specific ImageMagick modules because they are missing from the expected path. To fix this, you must copy all DLLs from your local ImageMagick installation directory (specifically those starting with CORE_RL_) into the same folder where you placed php_imagick.dll.

Locate your ImageMagick install folder (e.g., C:\imagemagick) and find the core library files. Copy every file beginning with CORE_RL_ from that directory into your XAMPP php/ext folder, overwriting any existing files with the same name. This ensures the PHP extension can locate its dependencies at runtime.

Handling Missing Dependencies: vcomp110.dll

Even after copying the core DLLs, you may still encounter initialization failures. If the console or Apache logs indicate a missing vcomp110.dll, this is a Visual C++ Redistributable dependency issue. The system cannot find the necessary runtime libraries to execute the ImageMagick binaries.

In such cases, you may need to download and register vcomp110.dll manually. While this often requires ensuring your Windows environment has the correct Visual C++ runtime installed, direct DLL registration can sometimes bypass immediate errors if the path is configured correctly.

Configuring the CLI Tool (convert.exe)

If your goal extends beyond PHP scripting to using the command-line interface (e.g., convert some-img.bmp some-result.jpg), you face a different constraint: module loading paths for the CLI tool. Running this command may yield an error like: unable to open module file 'C:\Users\my-acc\.magick\IM_MOD_RL_BMP_.dll': No such file or directory.

This happens because ImageMagick expects a specific user directory structure to find coder modules. To resolve this, create a folder named .magick inside your user profile directory (e.g., C:\Users\my-acc). Since the name starts with a dot, ensure you use the command prompt to create it:

cd C:\Users\my-acc
mkdir .magick

Next, navigate to your ImageMagick installation's coders directory (C:\imagemagick\modules\coders) and copy all files from there into the newly created .magick folder. This populates the required module libraries so the CLI tool can process various formats without errors.

Using Imagick in PHP Code

Once the DLLs are registered and dependencies are satisfied, you can instantiate the Imagick class within your application. Here is a practical example of generating a thumbnail using the PHP API:

$image = new Imagick($upload_data['full_path']);
$image->thumbnailImage(250, 0);
if ($image->writeImage($upload_data['file_path'] . $upload_data['raw_name'] . '_thumb' . $upload_data['file_ext'])) {
    // Success logic here
}
$image->clear();

Note that if you are working with CodeIgniter, the standard image_lib class may struggle to interface seamlessly with Imagick. In those scenarios, it is often safer to bypass the framework's image handling and use the native Imagick classes directly as shown above.

Our network