How to install imagick-php plugin

Easy. :slightly_smiling_face:

Add a quick script with the script found here:

Then, run it on the server you want it to be installed on.


I’ve been asked how to install imagick quite a bit lately so wanted to create and share out this quick script. Imagick is the php plugin for ImageMagick. If installed on a server, it will automatically become the go-to package for WordPress image editing.

Nice one, I get an error running that script:

debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (This frontend requires a controlling tty.) debconf: falling back to frontend: Teletype dpkg-preconfigure: unable to re-open stdin:

Here screenshot from the configuration:

I installed the php-imagick extension on a second server via the command line. This works flawless (of course), but the extension isn’t working. Why because imagemagick isn’t installed completely. This should happen before. I see that the package imagemagick-6-common is installed, but that seems not to be enough. Even basic functions like “convert” are not available.

… I’m not sure what was the problem and maybe the used command works. But on thing is missing, you need to enable the extension at least. I tried this the first time via the PHP configuration in Cleavr and that doesn’t worked very well (all disabled extensions has been replaced by the imagick extension value)

BTW the extension is only popular under WordPress users because someone has added a test for that extension and is telling that it would be an improvement. That would be the case if you use the image editor in WP very often (something that you shouldn’t do in the first place)

I tried installing again on a fresh server and I got this error too… But, re-ran and then it showed a success. :man_shrugging: It’s more of a warning I believe, maybe something we can display differently in Cleavr.

I don’t believe it needs to be explicitly added to php.ini file. At least, most of the install instructions don’t mention it and have you verify via running a command to check version and look in WordPress system info. In WordPress, I also installed the ImageMagick Engine plugin as another test and was able to configure it with imagick-php plugin without error.

You’re right, the second time the error/warning was gone and yes the extension is also enabled (automatically). Strange, I did this steps via the console on a different server and that was not so smooth.
Anyway nice feature to enable this PHP extension.

1 Like