Install ImageMagick/imagick PHP extension on CyberPanel/OpenLiteSpeed!

edited August 2019 in Tutorials

Update on 25th August

ImageMagick is now available in LiteSpeed official repo and can be installed using

yum install lsphpXX-pecl-imagick

Replace XX with PHP version. You can also use the instructions below but they are not needed anymore.


To install ImageMagick/imagick php extension you need a package called ImageMagic-devel, you can install from yum

yum install ImageMagick-devel -y

You also need php devel package, gcc and make:

yum install lsphp72-devel make gcc

Download imagick

imagick packages are available at

You can download the latest version, current latest version is 3.4.3.

Note: We are installing it for PHP 7.2, process is similar for other php versions.

tar zxf imagick-3.4.3.tgz


cd imagick-3.4.3
./configure --with-php-config=/usr/local/lsws/lsphp72/bin/php-config
make install

Then open your php.ini file which is located at /usr/local/lsws/lsphp72/etc/php.ini and append following at the end:


Now restart OpenLiteSpeed:

systemctl restart lsws


Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!