WP-CLI is one of the biggest upgrades you can make to your WordPress development, but it can occasionally trip over MAMP. You can read more about ImageMagick and its workflow capabilities at Smashing Magazine. Make sure to test for any compatibility issues. Rinse and repeat for other PHP versions to activate ImageMagick on all of them. Delete the semi-colon to un-comment it and enable the extension, save, and restart MAMP. In the php.ini document we’re looking for this line: extension=imagick.so It’s there to indicate you’re on the command line when using the command and not writing some other code.) (If you’re new to Terminal, don’t type the $. $ atom /Applications/MAMP/bin/php/php7.1.8/conf/php.ini I’m using Atom, but you could open it with a native command line editor such as Nano. We can open it with a text editor with a Terminal command. Here’s the full file path we’re looking for for this version: /Applications/MAMP/bin/php/php7.1.8/conf/php.ini Open the conf folder and open the php.ini file with a text editor. In the Applications folder, navigate to MAMP > bin > php and chose your version. To turn it on, we just have to uncomment one line of code from the PHP version we’re using.Ĭheck your PHP version in the MAMP preferences. The ImageMagick integration for PHP is called Imagick. So let’s make it available for our development. ImageMagick won’t strip color profiles from images by default, has compatibility with more file types (like making thumbnail previews for PDFs), has excellent optimization and resizing features and is what WordPress will use when it’s available. MAMP’s PHP libraries come packaged with ImageMagick, a superior processor for working with images via the WordPress Media Library than GD. I’m using MAMP version 4.2.1 on a MacBook Air running macOS High Sierra. Here are three things I’ve learned lately to make it work better for WordPress projects. Web development tool MAMP is a local server app which I love because it’s 1) free 2) it’s a little bit hard to use, which forces you to dig into the code and learn things to get it to work. Improve MAMP for WordPress local dev with 3 upgrades Improve MAMP for WordPress local dev with 3 upgrades Photo credit: Spencer Imbrock / Unsplash
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |