
Follow these steps to create the appropriate directories and set their permissions. PHP comes pre-configured with its own log directories, but we’re going to create our own “ /usr/local/log/” folder so they’re easy to find when we need to. Make sure to copy the entire line) $ ruby -e "$(curl -fsSL )" Create PHP Log File Directories ( Please note the following command is a single line that has wrapped due to page width constraints in Medium. If you haven’t done this already, then you’ll need to: Also, you don’t have to start with a fresh OS install to use this article, but these instructions start at the beginning with the assumption you have nothing installed because that’s just the easiest way to go. I’ve not tested on prior versions of macOS, but it should work similarly. These instructions work the same for macOS 10.13 High Sierra and 10.14 Mojave. This new approach allows for a more simple installation, more flexibility for versioning and will continue to work across all macOS versions. With the ever changing security rules in macOS along with the complications of using the macOS pre-installed PHP version along with PECL, I’ve decided to change my whole approach and instead use a setup entirely from Homebrew. php71-xdebug, php71-redis, etc.) and require installation through PECL (PHP Extension Community Library). MySQLi), most PHP extensions are no longer distributed through Homebrew at all (e.g. In addition, although some critical extensions are still supported (e.g.

Xdebug, Redis, etc.) from Homebrew.Īs of April 1, 2018, Homebrew deprecated the “Homebrew/php” tap in favor of a new “Homebrew/core” approach.


I would then install the PHP extensions I needed (e.g. In the past, I used to rely on the version of Apache and PHP that came pre-loaded with the OS on my MacBook Pro.
DOWNLOADING PHP FOR MAC HIGH SIERRA HOW TO
Make sure to check out Part One my article on How to Install Apache on macOS 10.13 High Sierra and 10.14 Mojave using Homebrew is a pre-requisite to this article. This article is for web developers who want Apache and PHP installed as part of their development environment setup on their Mac.
