1. Install PHP Imagick
To use Imagick with PHP 7 in your server, you can easily achieve it with the following command:
2. Verify if imagick has been loaded as an extension (optional)
You can verify if imagick has been loaded as an extension with the following command:
This should output imagick in your terminal.
3. Restart apache
As last step, you will need to restart the apache service after the installation of Imagick, otherwise you won’t be able to use the Imagick class in your PHP code. Restart the apache service using the following command: