Skip to content

Instantly share code, notes, and snippets.

@rickbenetti
Forked from remcotolsma/README.md
Created October 20, 2018 00:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickbenetti/ae0ff767e869dc65b3a0440d071bd4c1 to your computer and use it in GitHub Desktop.
Save rickbenetti/ae0ff767e869dc65b3a0440d071bd4c1 to your computer and use it in GitHub Desktop.
WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more

WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more

Brew

http://brew.sh/

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php

Git

brew install git
brew install git-flow
brew install git-ftp

Ruby

brew install ruby
brew install rbenv

Z shell

http://ohmyz.sh/

brew install zsh
brew install zsh-autosuggestions
brew install zsh-completions

Node.js

brew install node
npm install -g grunt-cli
npm install -g npm-check-updates
npm install -g bower

Compass

http://compass-style.org/

PHP

http://php.net/

brew install php70
brew install php70-xdebug

brew services start php70

php -v
brew install php-code-sniffer
brew install phpmd

Composer

https://getcomposer.org/

brew install composer

NGINX

https://www.nginx.com/

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

MariaDB

https://mariadb.org/

brew install mariadb
brew services start mariadb
mysql_secure_installation

phpMyAdmin

https://www.phpmyadmin.net/

brew install phpmyadmin
ln -s /usr/local/share/phpmyadmin ~/Websites/phpmyadmin.dev

WP-CLI

http://wp-cli.org/

brew install wp-cli

Dnsmasq

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment