How to install ImageMagick?


One of the nice little additions in Wordpress 4.7 is that PDF files uploaded to the media library now generate a preview image that can be used throughout wordpress natively.
This of course requires ImageMagick to work.

It’s easy enough to enable ImageMagick on MAMP (that I used to use), but how can I install ImageMagick on the Local by Flywheel server?

1 Like

Hey Anders,

Here are instructions on how to install it for PHP 5.6.20. It changes for other versions of PHP but I had this on hand :slight_smile: (390.5 KB)

  1. Unzip and copy the attached file ( to your site’s app folder
  2. Open SSH for the site. You can do so by right-clicking on the site then going to “Open Site SSH”
  3. Run: mv /app/ /opt/php/5.6.20/lib/php/extensions/no-debug-non-zts-20131226/
  4. Run: echo -e ‘\n\nextension = /opt/php/5.6.20/lib/php/extensions/no-debug-non-zts-20131226/’ >> /conf/php/5.6.20/php.ini
  5. Run: apt-get update && apt-get install -y imagemagick
  6. Run: service php-5.6.20-fpm restart

BTW, ImageMagick will be on by default for all PHP versions in an upcoming update.


Anyone that have install instructions for PHP7?

Most of the commands are like greek to me, so I can’t really figure out what to change…

I think you might just want to stick with 5.6 for now. I have read about issues with ImageMagick and 7, at least when it pertains to the PDF thumbnail functionality. My two cents, but not an expert on this.

This is actually crazy easy! Just run the commands. I downgraded 7 to 5.6, restarted the server and then followed the directions and it worked perfect…

Thanks @clay! Look forward to having it included in the future.

Still waiting for PHP ImageMagick to be on for all php versions… Thanks for your help on this clay, got it working on PHP 5.6.20 because of your post.

I’ve written some instructions for those who want to get this running on PHP 7.2

1 Like

@clay Are there any plans to include the necessary support for PDF Thumbnails? ImageMagick is one of those things.

It would be nice if this could be given priority for the next release as Local is made for WordPress. It is a bit like a WordPress hosting company not supporting all of the WordPress features…