WordPress development has come a long way. I started out developing on a self-hosted unix box running off a dialup account and DynDNS. Since then, I’ve switched between MAMP or VVV depending on which one was bothering me at the time. Both are reasonably decent tools, but from time to time, a workflow that was working perfectly fine at one point, inexplicably stops working, costing valuable time and sanity. Which means that I periodically explore what the state of the art is in this area, in case something amazing comes along.
I’ve recently started trialling Trellis by Roots. It’s a bit early to be making formal comparisons, but if you haven’t investigated this development stack yet, it’s similar to VVV in that it uses vagrant, and also has a boiler-plate WordPress installation (Bedrock) and theme (Sage) that you can use separately or in combination to kick-start your development. One of the more stand-out features is the ability to deploy your sites to different environments, allowing for consistency in deployment processes. This is fantastic for hosted sites on self-managed servers, but not terribly helpful if you have clients on shared hosting.
Trellis isn’t exactly solving the issues I’m having with MAMP and VVV, but I’m still getting a feel for the how I can incorporate these products into my workflow. Who knows, this might be The One(TM), or it’ll be a third stack that I add into my Rotation of Annoyance(TM).
Connecting Sequel Pro
PhpMyAdmin which is available out of the box with MAMP and VVV is omitted from Trellis, but if you’re running OSX, Sequel Pro is an excellent option to allow visual access to MySQL (or MariaDB), even if you’re a command line expert, without faffing around with setup.
The key part to this setup is the SSH key for the vagrant box.
After setting the MySQL credentials, your Trellis host name, with the vagrant user, click on the key and set it to the
private_key file in
.vagrant/machines/default/virtualbox/ under your Trellis install.
And that’s all there is to it.