This article provides a guide for how to install Imagick for PHP 8.3 on cPanel WHM server as a workaround to the alternative installation guide.
Pre-requisites
This guide assumes the following:
- PHP 8.3 packages have been installed through EasyApache 4 in the cPanel/WHM server
- ImageMagick packages have been installed for other PHP versions on the server
- Root-level administrative access is required
How to Install Imagick for PHP 8.3 on cPanel WHM Server (Workaround)
To install Imagick for PHP 8.3 on cPanel WHM server, follow the steps provided below:
- As root-equivalent user, login via SSH or use cPanel terminal.
- Run the following commands:
curl -L https://github.com/remicollet/imagick/archive/9df92616f577e38625b96b7b903582a46c064739.zip -o /tmp/imagick-issue-php83.zip \ && unzip /tmp/imagick-issue-php83.zip -d /tmp \ && /opt/cpanel/ea-php83/root/usr/bin/pecl install /tmp/imagick-9df92616f577e38625b96b7b903582a46c064739/package.xml \ && echo "extension=imagick" > /opt/cpanel/ea-php83/root/etc/php.d/imagick.ini
- Verify the installation.
Conclusion
You now know how to install Imagick for PHP 8.3 on cPanel WHM server (workaround).