If your typical WP workflow is on MAMP or an (x)AMP equivalent, the immediate benefit of Chassis might escape you and the effort might not seem worthwhile – but I used to do all dev work with MAMP and have completely switched to Chassis.
- Each site is sandboxed 100% to its own server environment (think Virtual Machine for each site).
- Resource usage is typically minimal
- Usage is easy… ‘vagrant up’ and go develop
- Its faster than the other projects (VVV and VagrantPress)
- The environment you develop with more closely matches manage hosting environments ( WP Engine via NGINX )
- It’s not MAMP… sometimes this is enough to switch.
What you need; TLDR
- Install Git CLI
- Install VirtualBox (free) or similar supported VM manager
- Install Vagrant
- Install Vagrant HostsUpdater (this might change in the future)
- Run Vagrant Up
- Time (put aside an hour if all this is new to you)
Number 5 is only important if you are new to terminal.Most of these steps are simple “copy and paste” but if something doesn’t work – you might need to know how to troubleshoot it.
Let’s go pre-requisites
Nice and easy, visit: http://git-scm.com/download/mac and download the latest version of GIT. This will allow you to use the GIT command in the Command line
Next up, Virtual Machine manager, VirtualBox: https://www.virtualbox.org/wiki/Downloads. I currently have version 4.3.10 for OS X hosts
Download and install Vagrant for your OS: http://www.vagrantup.com/downloads
4. Install Vagrant-hosts-updater (via terminal)
Open terminal (Command + Space -> type “Terminal) or Applications->Terminal; and type the following command
vagrant plugin install vagrant-hostsupdater
With our environment almost ready to be chassis-fied, we can start getting to the fun part.
1. Clone the Chassis repository into a project folder (via terminal)
Within Terminal I typically make a folder called “repo“ and use the GIT clone command to make project folders. In this example I would use the following (where new-project is the name you want for the project)
cd ~/ && git clone --recursive https://github.com/Chassis/Chassis.git new-project
2. Change directory and vagrant up (via terminal. 5 – 20 mins, up to 300mb)
In terminal type the following command (replacing new-project for the project name in the previous step).
cd new-project && vagrant up
This is the magic moment… so much is happening behind the code but I’ll sum it up:
- Virtual Box is downloading a new image which it will reference for all future VM’s created
- Chassis is configuring the new image and setting up the environment (this is magic, installing NGINX / PHP / Download and configuring WordPress)
2.1 Enter your password:
This is your user account password (if you haven’t set one – you can hit “enter” and try your luck.
3. Grab a browser and prosper
You should now be able to open a browser and visit http://vagrant.local to view the following awesomeness:
Granted, this tutorial ends with a white screen – but the next episode in the series we’ll discuss how to give your project a head start by using the Chassis content directory repo named “Supercharger“