A modern, easy to configure, WordPress ready Vagrant box, perfect for local development.
As a developer, one of the most important pieces of technology I use daily is my chosen virtual server stack. Depending on your operating system of choice, there are a few solid options out there, but since discovering Vagrant I've always preferred it over other options. A preconfigured Vagrant box is, in my opinion, the closest you can get to a local, real world web server without actually building one yourself (and I've actually done that as well), all possible from a virtual machine that is just as easy to discard and replicate should you need to.
While there are many WordPress developer friendly options out there, from VVV to 10up's WP Docker, I found Scotch Box a little while ago and it provided me with the best combination of features and ease of use. I liked it so much I even customised it a little further and released that customisation on GitHub.
What I enjoyed the most about ScotchBox was how easy it was to get up and running for my existing workflow. I tend to work on a few client projects at a time so it means at any one time I have two or three web project folders I am busy with. All of the existing options tended to shoehorn me into a specific workflow/url mapping/directory structure and configuring them to fit my setup seemed like a lot of work. ScotchBox was different, I could just take the Vagrantfile, pop it into my project web root directory, start up ScotchBox and everything just worked.
There were however a few things missing or not set up exactly how I would have liked it
- It did not come with PHPMyAdmin installed and I like using PHPMyAdmin for quick data lookups.
- While it offered the option to run multiple sites on one box, it required a little too much editing of the Vagrantfile to use the same base box for different projects at the same time.
- It did not support Xdebug out of the box.
- The MySQL root password was 'root', I always use 'password', meaning I had to edit each site's wp-config.php to change it.
- Finally, I prefer my vagrant configuration files to reside inside a folder called 'vagrant', so that there is less clutter in my web root.
This is what lead to the customised version of ScotchBox I wrote about earlier.
Then why BossBox?
ScotchBox has served me well for the past year and a half but I've been yearning to create something a little more streamlined but meeting my specific requirements ever since I first released my 'tweaked' version of it.
Earlier this year ScotchBox developer Nicholas Cerminara updated the free version of ScotchBox and released ScotchBox Pro, which includes an updated server version (Ubuntu 16.04) and therefore updated versions of all the bundled software. The Pro version also included the install script that he uses to create the base ScotchBox in the first place.
This gave me the opportunity to not only build my own version of ScotchBox but also remove all of the software that I don't specifically need and add some additional software and settings that I do need, and so BossBox was born.
BossBox comes in two variants, one with Apache as the web server and one with NGINX. Besides that, both versions are identical, WordPress ready development boxes that are easy to set up and use. I invite you to take a look, try one (or both out) and leave your feedback, either in a comment on this blog post or, if you find a bug, as an issue in the respective GitHub repo. The BossBox Vagrant, configuration and setup files, as well as the box itself, is licensed GPL 2.0, so feel free to use it, modify it and customise it to your needs.