> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.serverfreak.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Install ImageMagick PHP Extension on Direct Admin Server

|| NOTE: The latest source code repository for ImageMagick can be found at https://pecl.php.net/package/imagick


1. Perform the following steps inside SSH server.

**wget https://pecl.php.net/get/imagick-3.4.3.tgz**
**tar -zxf imagick-3.4.3.tgz**
**cd imagick-3.4.3**
**phpize**
**./configure —with-imagick=/usr/local**
**make**
**make install**
****

2.  The above steps should be sufficient to complete the installation of ImageMagick. You may perform the following steps if you encounter the following error message.


|| configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.


Install ImageMagick-devel package and try again: (Not necessary if you do not receive the error message)

**yum install ImageMagick-devel**
****

Next, edit the file below:
**vi /usr/local/DirectAdmin/custombuild/configure/ap2/configure.php5**


Remember to add this line and save the changes:
**--with-imagick=/usr/local**


Recompile PHP with Direct Admin's custom build:
**cd /usr/local/DirectAdmin/custombuild**
**./build php n**
****