

Since writing this MAMP 5 has come out and there are some small updates.There’s a popular saying among entrepreneurs that you should try to break things first, so that you can make them better. PING test.local (127.0.0.1): 56 data bytesĮvery now and then I come back to this article to get things set up for myself or co-workers. To confirm that this is working, ping a local. For DNS configuration add your local IP 127.0.0.1 first followed by your usual DNS IP addresses: 127.0.0.1 To do this, Go to System Preferences and then Network.
#INSTALL MAMP MAC OS#
We now need to configure our mac OS to use the new local DNS server. Sudo launchctl load /Library/LaunchDaemons/ Start and Stop sudo launchctl stop Load DNSMasq at start sudo cp -fv /usr/local/opt/dnsmasq/*.plist /Library/LaunchDaemons This will tell any request coming in at *.dev to use our local IP. The configuration is stored in nf under /usr/local/etc/. The Mac OS hosts file will not allow us to use wildcard subdomains, To get around this we can use a local DNS Proxy called DNSMasq.

Zend_extension="/Applications/MAMP/bin/php/php7.0.12/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so" Configure your local DNS (Optional) It should already be there but will be commented out. extension=redis.soĮnable Xdebug at the bottom of the file by Deleting the. Look for Extensions and Enable Memcached and Redis extensions. short_open_tag = OnĬopy redis.so from the appropriate subdirectory of this repo to /Applications/MAMP/bin/php/php5.x.x/lib/php/extensions/no-debug-non-zts-200xxxxx (Change to your PHP version) While WordPress coding standards won’t allow short tags to be enabled… Who really has time for that. $ brew info redis Setup MAMP 4: Configure PHP

$ launchctl unload ~/Library/LaunchAgents/ Stop Redis on autostart on computer start. Start Redis server using a configuration file. If it replies “PONG”, then it’s good to go! $ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
#INSTALL MAMP INSTALL#
Look for Extensions and uncomment extension=memcached.so Install Redis (Optional): Open /Applications/MAMP/bin/php/php7.0.12/conf/php.ini $ ln -sfv /usr/local/opt/memcached/*.plist ~/Library/LaunchAgents Enable Memcached with PHP. Launch Memcached when the computer starts. Look for # Virtual hosts and uncomment the line ( delete the # )Ĭreate an entry in /Applications/MAMP/conf/apache/extra/nf ĭocumentRoot "/Users/yourusername/Sites/mydomain.ca" Open and edit /Applications/MAMP/conf/apache/nf Search for DocumentRoot Change the path to /Users/yourusername/Sites Set the Document Root to ~/Sites Or where ever you keep your PHP projects. In fact, I think it’s the best option going. Most Unix commands won’t work ( Thanks, Apple ).īut as you become more and more familiar with MAMP it’s not all that bad. Sometimes your configs will break, and MAMP is not set up like your Ubuntu VPS, things are not in the same locations.
#INSTALL MAMP UPDATE#
Some MAMP pros include all local sites being accessible at the same time, simple MySQL administration with PHP MyAdmin or Sequal Pro.īut some of the negatives can come once you have made changes to various config files and then go to update MAMP or add newer versions of PHP.

But consider being responsible for 40 different sites, all with various changes and updated. If you like Vagrant and Docker then keep at it. In my opinion, things like Vagrant and Docker have their place but tend to overcomplicate and slow down local development. This MAMP development setup is what I have used for years while working on many freelance projects, personal projects, and obviously the day to day work projects. If you work on multiple sites or projects at the same time across different frameworks and or CMS’s then MAMP will make your life simple. Like it or not, MAMP is an excellent tool for local development.
