Vagrant and Custom Domains with WordPress

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

10 responses to Vagrant and Custom Domains with WordPress

  1. I would not recommend creating a new Vagrant install for each additional site you need to support—that will just create a lot of overhead and could potentially result in a number of duplicate virtual machines being created, which would eat up space quickly. Varying Vagrant Vagrants already includes the ability to support multiple custom domains right out of the box.

    Instead of cloning the Varying Vagrants repository in the “Starting Out” step, just make a new directory inside of the www/ folder, such as www/ — Then, create a new configuration file to /config/nginx-config/sites/ (see for the template) called that points to the new site’s directory. Add a database entry using the template at /database/init-custom.sql.sample (rename to init-custom.sql), unzip WordPress to your new directory, and you’re good to go! Same result, much less mess left behind on your development machine.

    Happy Vagrant’ing,

  2. Thanks this was super helpful to see someone do. I think the VVV installation process is well documented at this point by several people, but actually setting up WP sites inside VVV hasn’t been covered.

    Hopefully most people are creating multiple sites within a single VM and hopefully if not yet, then soon some will walk through the process manually and then using a script (grunt or something).

  3. Came back to this and think I finally get it all, yay!

    One thing I noticed was you edit /etc/hosts directly. With VVV and vagrant-hostsupdater though you can add the record to the vvv-hosts file in your vagrant directory and have adding/removing it managed by VVV. That way when you ‘vagrant halt’ it’s removed and ‘vagrant up’ it’s put back in.

    • Yeah I’ve been told that twice now and simply haven’t had a chance to dig in with a new project that needs configuration yet.

      Once I’ve had a chance I’ll update with a new screencast.

  4. You should update the git link to the new official VVV repo. The one in the article gives me an error. :(

Trackbacks and Pingbacks:

  1. Add a new domain to an existing VVV (Vagrant) box - December 19, 2013

    […] Vagrant and Custom Domains with WordPress […]

  2. SFNdesignWe love to use Vagrant » SFNdesign - April 15, 2014

    […] Vagrant and Custom Domains with WordPress […]

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>