Do you use Vagrant for WordPress development?
I came across vagrant last year and I’ve been itching to use it ever since for local development of WordPress websites. I wondered if any of you use it?
From what I know so far, Vagrant allows you to quickly build a virtual machine on your Windows/Linux/Mac computer. It has the following advantages-
- The files on your virtual machine are available on your host machine using shared folders. This means you can use your favourite code editor to edit files on your virtual machine
- You can build virtual machines with the environment that you want. That could be Ubuntu x, PHP 5.4, MYSQL 5.x, Apache, WordPress 3.4,1, blah blah…
This vagrant example looks really cool- https://github.com/ChrisWiegman/Primary-Vagrant
Unfortunately I’ve not been able to get things set up. I keep on encountering errors. My machine runs WIndows, so I am not sure how well Vagrant runs on Windows.
davidc 1703 on Tuesday 18 February 2014 Permalink | Log in to Reply
I know my colleague James uses it on Windows and my plan is to do similar – but he’s yet to fully document or write up the methods.
Unfortunately we’re crazy busy at the moment so not sure how long it’ll be before we can share freely (and we’re concentrating on profitability over sharing right now having had a trickier year than expected), but for sure it can be done.
Ian Anderson Gray 1804 on Tuesday 18 February 2014 Permalink | Log in to Reply
Thanks, David. I understand about the crazy busy thing! Learning Vagrant (at least for me) is taking time, and I really don’t have much of it. I could almost do with someone just setting up for me, but that’s quite lazy of me! Would be great to share some thoughts and ideas here!
davidl 1703 on Tuesday 18 February 2014 Permalink | Log in to Reply
Keep meaning to use it – we’ve got some new starters joining so one of their first jobs might be to set this up.
This is pretty cool to, from 10up: https://github.com/Varying-Vagrant-Vagrants/VVV
Ian Anderson Gray 1807 on Tuesday 18 February 2014 Permalink | Log in to Reply
As I said- it would be cool to share our experiences here. Let me know how you get on.
I do like the look of VVV, but it uses nginx instead of Apache- so that’s a bit of a deal breaker for me. The link I included above (Primary Vagrant) is based on VVV but uses Apache. I also love the look of Bedrock (from the Roots guys). They are working on a Vagrant box- http://roots.io/wordpress-stack/ but it really looks like it isn’t for the faint hearted. I think I’ll start simple and work towards that!
treb0r 1450 on Tuesday 25 February 2014 Permalink | Log in to Reply
For what it’s worth, I like Vagrant, but I also use just plain Virtualbox. VVV seems to be the way for the WP elite, but it uses Ubuntu and I’m still using good old Debian for serving most websites. IMHO vagrant stands out when you need to be able to provision VMs quickly, particularly for teams of devs. if you are developing solo then it pays to get your own VM setup in Virtualbox that matches your preferred server environment.
TCBarrett 2156 on Friday 28 March 2014 Permalink | Log in to Reply
It shows definite promise. However when compared to [MWLX]AMP it is obvious which is easier for a beginner to get up and running with. If the point is to avoid having to be a sysadmin, then vagrant isn’t really there.
It needs a more graphical UI with 100% of common requirements fulfilled without using the command line.
At it needs a better user guide (not technical documentation).
Although I appreciate that it is new, it feels slower. I can set up my VPS for a new project and have others participating quicker than I can re-provision and distribute my VVV. And it is slower than adding a hosts entry to MAMP .
Those are the hurdles, IMHO.
Ian Anderson Gray 2115 on Monday 31 March 2014 Permalink | Log in to Reply
I know where you are coming from. The fact that I am not a sysadmin has meant that I have been tearing my hair out over Vagrant. The reason I’ve stuck at it is because I see how powerful it could be. I’ve never got on with likes of LAMP, XAMP etc because I’m using a laptop with Windows and my sites run on a Linux server. I want to be able to test sites running on the same environment particularly due to some of the plugins I use and other optimisation stuff.
It might well be slower to use Vagrant at the start, but I think once you’ve got them set up you’ll end up being speedy.
I love the sound of VVV but it doesn’t use Apache and so that is an issue for me. That’s why I’m using Primary Vagrant (as I mentioned above).
mattw 2248 on Friday 28 March 2014 Permalink | Log in to Reply
We recently started using Vagrant for development at our company. It makes sharing development environments across team members really easy. I created this starter guide for people who want to use vagrant but who are shy of the command line: http://mwatson.co.uk/getting-started-vagrant/
TCBarrett 2255 on Friday 28 March 2014 Permalink | Log in to Reply
Thanks for sharing, Matt.
“For this guide we will get deep and dirty in command line, and even do some bash scripting, ”
That’s where MAMP will ‘win’ for many freelancers and smaller teams.
Ian Anderson Gray 2117 on Monday 31 March 2014 Permalink | Log in to Reply
Thanks, Matt. Great tutorial, wish I had seen this earlier. One of the issues that effects me is that most tutorials (including yours) are based on it working on a Mac. It shouldn’t cause any issues, but I did encounter some issues when running on Windows. Thankfully I think I am up and running now. Maybe I’ll end up writing my own tutorial. Give me a few years though! ;-)
Tony Scott 1327 on Tuesday 1 April 2014 Permalink | Log in to Reply
There’s a post on VagrantPress, “an alternative to VVV”, on WP Tavern.