Collection of tools to quickly setup a dynamic PHP dev environment on OSX
Perl Shell
Switch branches/tags
Nothing to show
Clone or download
ctcherry Switch resolver to .loc instead of .dev
Chrome 63 forces .dev to https
Latest commit 23727d1 Dec 7, 2017


Quickly setup a dynamic multi-site PHP/Apache development environment on OSX.


  • OSX (Tested on Snow Leopard 10.6, Lion 10.7, Mountain Lion 10.8 and Mavericks 10.9)
  • Perl (should already be installed on OSX)
  • Bash (definitely already installed on OSX)



$ bash < <(curl -s

This script will download the latest code, install it into ~/.easy_php_dev and then run the enable command described in the Usage section below. Feel free to view the and scripts first to make sure they are safe.


After you have run the installer above, you are good to go, the system is already enabled. In your home directory a new folder has been created: ~/EasyPhpDev/sites. Inside of there you simply create a folder for each of the sites you want to work on, ending with a with a .dev domain (, or, and it becomes your document root. If you navigate to it in a browser on your local machine ( it will be immediately available.

Additionally, ~/EasyPhpDev/phplib has been added to the PHP include_path so you can put any shared libraries in there. And short_open_tag is enabled.


Enable dynamic environment and .dev domains:

$ ~/.easy_php_dev/ enable

Disable dynamic environment and .dev domains:

$ ~/.easy_php_dev/ disable

Set force mode. When enabled, all local web requests, no matter what domain or IP is used will resolve to the specified site. This is useful for viewing your dev site in VMs and from other computers:

$ ~/.easy_php_dev/ force

Disable force mode. This returns the environment to its normal state:

$ ~/.easy_php_dev/ force off

Disable and uninstall everything (if you run this command you will have to reinstall):

$ ~/.easy_php_dev/ uninstall