Step by Step - Imagemagick Support for PHP 7+


#1

These instructions were tested on PHP 7.2 which at the time of writing was available in pre-release version 2.2.0

Open a SSH shell on the site.

apt-get update && apt-get install -y pkg-config libmagickwand-dev imagemagick build-essential git autoconf

cd /

git clone --depth 1 https://github.com/mkoppanen/imagick.git

cd imagick

/opt/php/7.2.0/bin/phpize

./configure --with-php-config=/opt/php/7.2.0/bin/php-config

make install

echo -e ‘\n\nextension = /opt/php/7.2.0/lib/php/extensions/no-debug-non-zts-20170718/imagick.so’ >> /conf/php/7.2.0/php.ini

service php-7.2.0-fpm restart


How to install ImageMagick?
#2

Thanks for the guide.
It all went good 'til after this

when I give ‘cd imagick’ command it says ‘no such file or directory’.

Any help, please?
Thanks.


#3

It works! Thank you very much!