Skip to content

Instantly share code, notes, and snippets.

@danielpataki
Last active April 24, 2019 14:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpataki/7670cf4a77e405f3b56b137d9d706770 to your computer and use it in GitHub Desktop.
Save danielpataki/7670cf4a77e405f3b56b137d9d706770 to your computer and use it in GitHub Desktop.
Using VVV
vagrant plugin install vagrant-hostsupdater
vagrant plugin install vagrant-triggers
git clone git://github.com/Varying-Vagrant-Vagrants/VVV.git ~/websites/sites
192.168.50.4 vvv.dev local.wordpress.dev local.wordpress-trunk.dev src.wordpress-develop.dev build.wordpress-develop.dev
git clone https://github.com/bradp/vv.git vv
cd vv
sudo cp vv /usr/local/bin
server {
listen 80;
listen 443 ssl;
server_name portfolio.dev;
root {vvv_path_to_folder}/htdocs;
include /etc/nginx/nginx-wp-common.conf;
}
@tomjn
Copy link

tomjn commented Apr 24, 2019

Hey! lead VVV developer here, things have changed a bit since this was created, so some notes:

  • Google sells the .dev domains, so use .test instead, they added lots of stringent security restrictions too so you can't use .dev unless you have properly made SSL certificates
  • We have custom site templates now, all you have to do is modify vvv-custom.yml to add a site, no Nginx work needed
  • Vagrant triggers isn't necessary anymore, it got merged into Vagrant, you'll actually get warnings if you try to install it
  • The vv tool was abandoned, and has issues, don't use it. vvv-custom.yml can handle everything vv did

To add a portfolio site, you just modify vvv-custom.yml like this:

sites:

  # latest version of WordPress, can be used for client work and testing
  portfolio:
    repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
    hosts:
      - portfolio.test

Re provision with vagrant reload --provision and you'll have a site at http://portfolio.test ( https://portfolio.test if you add the VVV SSL root certificate )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment