You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

1.1 KiB

Part 1: Install the ImageMagick Package The core ImageMagick library needs to be installed on your operating system. The command varies slightly depending on your Linux distribution. For Ubuntu/Debian based systems

sudo apt update
sudo apt install imagemagick imagemagick-doc

Install the imagick PHP Extension

sudo apt install php-imagick -y
sudo apt install php7.2-imagick -y
sudo apt install php7.3-imagick -y
sudo apt install php8.1-imagick -y
sudo apt install php8.2-imagick -y
sudo apt install php8.3-imagick -y
sudo apt install php8.4-imagick -y

Restart Services and Verify After installation and configuration, restart your web server and PHP-FPM services for the changes to take effect.

For Apache:
sudo systemctl restart apache2 # or sudo systemctl restart httpd

For Nginx (using PHP-FPM):


sudo systemctl restart phpX.Y-fpm # e.g., sudo systemctl restart php8.2-fpm

Verification: Run the following command for each PHP version to confirm imagick is listed:


php -m | grep imagick
# or use phpinfo() in a web script to see the 'imagick' section