How to Install Imagick on Mac for PHP 8.0.8 and MAMP
Posted on January 6, 2023
A straightforward guide to installing Imagick on a Mac using PHP 8.0.8 and MAMP.
Step 1 – Install php
Install php via Homebrew.
brew install php
Step 2 – Install Imagick directly from the repo
Be sure to run these commands one by one.
git clone https://github.com/Imagick/imagick
cd imagick
phpize && ./configure
make
make install
Here is a YouTube video that shows Step 2 in action.
Step 3 – Enable imagick.so in MAMP’s php.ini file
It is located in MAMP > bin > php > php8.0.8 > conf > php.ini
Then, search for extension=imagick.so.
It will likely be commented out via a semicolon character before extension=imagick.so.
Remove the semicolon to enable the imagick.so extension.
Step 4 – Restart the php services
Restart php services via Homebrew command.
brew services restart php
Step 5 – Verify that imagick shows up in phpinfo
Launch MAMP and check the phpinfo by going to Tools > phpInfo.
Then, search for imagick.
You should see imagick appear, congrats! It should be successfully installed.