WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install git
brew install git-flow
brew install git-ftp
brew install ruby
brew install rbenv
brew install zsh
brew install zsh-autosuggestions
brew install zsh-completions
brew install node
npm install -g grunt-cli
npm install -g npm-check-updates
npm install -g bower
brew install php70
brew install php70-xdebug
brew services start php70
php -v
brew install php-code-sniffer
brew install phpmd
brew install composer
brew install nginx
Download https://github.com/remcotolsma/localhost-home-dev in the ~/Websites/
folder.
echo include ~/Websites/nginx/nginx.conf\; > /usr/local/etc/nginx/nginx.conf
brew services start nginx
brew install mariadb
brew services start mariadb
mysql_secure_installation
brew install phpmyadmin
ln -s /usr/local/share/phpmyadmin ~/Websites/phpmyadmin.dev
brew install wp-cli
http://www.thekelleys.org.uk/dnsmasq/doc.html
brew install dnsmasq
echo 'address=/.dev/127.0.0.1' > /usr/local/etc/dnsmasq.conf
sudo mkdir /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev'
sudo brew services start dnsmasq
scutil --dns
Note that if you're using Mountain Lion you may need to reboot before the /etc/resolver settings take effect globally. I was able to get pings to work right away but Chrome would not resolve properly until I restarted.
Source: https://echo.co/blog/never-touch-your-local-etchosts-file-os-x-again
Resources: