MyLocalDev Part 1: Background

Published 2 weeks ago on September 28, 2017 — 3 min read

I recently updated my computer and in doing so decided to start fresh instead of migrating everything over. I’m a developer and with that comes a ton of tinkering which results in a lot of extra cruft lying around over time. Unused applications, configurations that have been tinkered with beyond recognition, heck even virtual machines that have gone unused for months.

A lot has changed in the development landscape over the past couple years (what else is new?) and I wanted to optimize my local development environment to best suit my workload and my preferences. OS X is a great platform for developers, and here’s what my setup looks like as of… today.

MEMP and Valet

The primary driver for my local development is Valet running on top of a MEMP stack. Naturally the first question to ask is ”Why aren’t you using ?!” and my answer to that is as follows:

My languages of choice are: PHP, HTML, JavaScript, CSS. The PHP I write is primarily in the context of WordPress. PHP and WordPress were purpose built to run just about anywhere, so having a virtual environment that exactly matches a production server simply isn’t something I find important. I’m not writing bleeding edge applications that rely on or avoid specific issues with PHP versions, and I rarely ever have to do with missing modules or anything of the sort.

Why not Vagrant?

While I completely understand (and appreciate) the purpose behind and the desire to have a sandboxed faux-production environment for development, I prefer the convenience of this setup as it affords me super simple (read: local) Xdebug integration, and avoids potential virtual machine hiccups. I know and recognize that having a server environment running all the time on your computer eats up resources and battery life, but that doesn’t change much for me because even when I did use virtual environments I left them running all the time anyway.

Why not Local?

Local by Flywheel is awesome. Seriously. Docker is everywhere, it rocks, and Local makes working with it specifically for WordPress projects even more awesome. I use Local for a few types of projects, but the kicker for me is Xdebug integration. While Xdebug works just fine with Local, it’s not as automatic as my lazy self wants it to be. Having Xdebug running locally makes integration with various editors/IDEs a bit more straightforward. That probably speaks to my ability as a programmer but it’s an influence on my productivity.

Why not MAMP?

MAMP is awesome (seriously) but I liked that Valet simply works by the directory names you have set up. Yes, I’m lazy. After tinkering around a bit I found a couple other things Valet on local MEMP allowed me to do that solidified my enjoyment of the environment. Primarily getting MailHog set up to capture all outgoing email, and a new (to me) way of making my development environment stand out.

Read more from this series

This article is part of a MyLocalDev series all about local web development on OS X. Check out the other articles in this series:

Copyright © 2006—2017 Jonathan Christopher