After watching Mark Jaquith’s talk on development workflow at WordCamp 2013 I decided to learn something about it myself. I spent time with configurations like VVV and others but never really could find one that fit my need so I started Primary Vagrant. It was great but… It needed some improvements.
Today I’m happy to announce the release of Primary Vagrant 2.0. This Apache based Vagrant configuration uses Puppet to achieve functionality similar to VVV but with, at least in my opinion, a bit more flexibility to develop a range of local PHP based applications, not just WordPress (although it is highly customized for WordPress plugin and theme development).
So what’s new?
- Directory mappings now have their own file, mappings, in the www directory to avoid having to edit Vagrantfile
- Each new site (or any folder added under the www folder) can now have it’s own pv-hosts file containing any hostnames needed for the project
- Site configuration can now more easily be done per site by adding a file to the manifests/sites folder containing all the configuration items for your current project
- The standard WordPress development domains have been reconfigured to, well, make more sense. default sites now include trunk.wordpress.pv, stable.wordpress.pv and legacy.wordpress.pv
- The WordPress Coding standards have been added, along with PHP_Codesniffer to help make sure your WordPress code is better than ever before.
- Automattic database backups. Thanks to some scripts I borrowed from VVV, Primary Vagrant will now backup your databases during vagrant halt or vagrant destroy making it even easier to keep your projects portable.
- All software has been updated to more modern versions.
- Numerous little goodies such as a better plugin selection and more have been added.
To be honest, upgrading here isn’t going to be easy. I’ve rewritten enough of this that I recommend you check it out separately if you haven’t already been on the development version as nearly the entire workflow of adding sites has been reimagined from 1.x. Of course, you don’t have to upgrade at all if you want. While I will no longer be maintaining 1.x you can still download it if you desire.
As far as this has come I think it still has more room to grow. In particular I would like to implement PHP version switching through PHPBrew or something similar as well as a site builder similar to the ones found for VVV. Both of these are on the table for early 2016.
Of course this will go even faster with help so please don’t hesitate to issue pull requests for anything you might be able to help with.
Does it Work?
I’ve actually been running the 2.0 branch of this myself since about April and have had it as the default branch for the repository since August or so. It’s stable. Current issues are overwhelmingly due to the use of GIT submodules which can take some getting used to if you’re not familiar. I do recommend following the directions closely when you update.