Screen Shot 2013-12-19 at 2.07.23 PM

Adding a new domain to an existing VVV (Vagrant) box

This content is restricted to buyers.

Curtis McHale

Posts Twitter Google+

Curtis is a web designer/developer specialized in WordPress eCommerce development on WooCommerce. You can get in touch with him about projects on SFNdesign.
My Blog is 4 Times Faster Than Your Blog

8 responses to Adding a new domain to an existing VVV (Vagrant) box

  1. First, this is awesome. Thank you.

    I just finished watching your 3 vagrant screencasts and they answered all my practical questions about getting WP up and running on VVV. I tried a couple time before but crashed and burned each time. The bigest sticking points being VVV is essentially a single vagrant instance w/ it’s own www directory. This point previously wasn’t clear to me and it made no sense to me to spin up a vagrant box for each site/plugin (but most vagrant users seem to. In my world it does make sense to have a few for different configs (nginx/apache, memcache/opcode/xcache/apc, PHP versions, etc), but not 50 for 50 sites.

    I currently have 50+ sites in MAMP and it wasn’t clear to me how to move one (or all) of them into Vagrant. In previous attempts I thought I’d need to create 50 vagrant boxes. Now, thanks to the screencasts, thing make sense and I’ve figured out how to do that sensibly.

    I do have two questions having just watched this screencast: 1) I’m surprised you haven’t scripted all that file editing, why not? 2) I’m surprised you’re strategy for creating DBs is to add them to init rather than just create them directly, is there a reason for that?

    • I’m glad it cleared things up for you.

      My file script-fu is week so I simply haven’t tried.

      I simply feel more comfortable adding them to the init. The other side affect is that if they are in the init, and you have a DB in the database/backups folder of the exact same name it will auto-import the database as you run the VM. Makes setup easier for other devs or designers I’m onboarding and sets up WP Migrate DB Pro for them with all the URL translations.

  2. It seem inconceivable to me that someone so comfortable with the command line doesn’t have matching script-fu skills, but I get it, neither do I!

    I figured this VVV Auto Site Setup was a good starting point. https://github.com/varying-vagrant-vagrants/vvv/wiki/Auto-site-Setup
    Should I manage to digest that and then get it a working script built where I can just pass it a domain name and it creates the rest (which is what I’m hoping for) I’ll put it on GH and link to it.

    One thing stumbled with is that It _seems_ like init-custom.sql only run on provisioning (not halt/up). Maybe it’s just me.

    One other thing was I had assumed I could move the MySQL folders (.opt & .frm files) from Mamp Pro to Vagrant, but they don’t seem to work. They show up, but the tables are corrupt somehow (when I select them Sequal Pro throws errors and complains). Seems like I HAVE to SQL dump them to move them for now, but the trick of dumping them to /backups and then them being auto-imported sounds slick.

    • I really just fake my command line fu, fake it well.

      I’ll have to dig in to the auto site setup as well and see what I can get going, when I have time which doesn’t seem like it’s going to be any time soon.

  3. Thanks for this Curtis. I have recently started using VVV and command line etc. I got an additional domain working after realising I needed to run: vagrant provision as opposed to just vagrant up to get the install rocking.

  4. I’ve found https://github.com/aliso/vvv-site-wizard to be a great script to automate the site setup

Leave a Reply

*

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>