Installing VVV

Overview Overview

Varying Vagrant Vagrants is an open source Vagrant configuration focused on WordPress development. VVV is MIT Licensed.

VVV is ideal for developing themes and plugins as well as for contributing to WordPress core.

This article will walk you through the steps to install VVV on your Mac, PC, or Linux computer.

Top ↑

Installing VVV Installing VVV

VVV requires recent versions of both Vagrant and VirtualBox (or similar) to be installed.

Vagrant is a “tool for building and distributing development environments”. It works with virtualization software such as VirtualBox to provide a virtual machine sandboxed from your local environment.

1. Downloading VirtualBox 1. Downloading VirtualBox

Navigate to the Downloads page on the VirtualBox site. Just like with Vagrant, there are several different download packages available depending on your operating system. Choose the one that’s right for you.

Depending on your operating system, the installer package will be anywhere from 60mb to upward of 120mb, so again, it might take a few minutes to download. Once the download is completed, run the installer.

Top ↑

2. Downloading Vagrant 2. Downloading Vagrant

Navigate to the Downloads page on the Vagrant site. There are a variety of download packages available depending on your operating system, whether that is Mac OS X or Windows. If you’re running Linux, packages are available for 32- and 64-bit Debian and CentOS distributions. Choose the one that’s right for you to download

Depending on which one you download, the installer package will be anywhere from 65mb to 150mb, so it will take a few minutes for the download to complete. When it’s done, run the installer.

Top ↑

3. Installing Vagrant Plugins 3. Installing Vagrant Plugins

VVV requires 2 vagrant plugins, vagrant-hostsupdater and vagrant-triggers, both can be installed with the following command in a terminal or command prompt:

vagrant plugin install vagrant-hostsupdater vagrant-triggers

Top ↑

4. Grabbing VVV 4. Grabbing VVV

There are official instructions for grabbing VVV here, it will place it in a vagrant-local folder in your home directory.

Top ↑

4. Start up VVV 4. Start up VVV

  • In a command prompt, change into the new directory with cd vagrant-local
  • Start the Vagrant environment with vagrant up --provision
  • Be patient as the magic happens. This could take a while on the first run as your local machine downloads the required files.
  • Watch as the script ends, as an administrator or su password may be required to properly modify the hosts file on your local machine.

Once the provisioning script has run its course, visit the VVV dashboard at  http://vvv.test in your browser. You should see a listing of all the sites VVV created, as well as links to other administration-related tools:

You can also setup additional sites, to learn how to do that click here.

Top ↑

5. Create GitHub Repo (optional) 5. Create GitHub Repo (optional)

Pull requests on GitHub provide a convenient way to receive feedback and also to share the patch for your contributions. You can add “.diff” to any pull request URL and GitHub will return a diff file which you can then attach to a Trac ticket. You can also just add a link to the pull request in a Trac ticket comment. There is currently no Git repo clone for develop.git.wordpress.org located on GitHub, so you have to set this up yourself:

  1. Have VVV set up (above).
  2. Swap out your SVN repo with a Git one in VVV via: vagrant ssh -c /srv/www/wordpress-develop/bin/develop_git
  3. Create an empty “wordpress-develop” on GitHub (you can name this however you like).
  4. Run these commands to set this new repo as your origin remote: cd ...vvv/www/wordpress-develop/public_html && git remote set-url origin https://github.com/YOURNAME/wordpress-develop.git && git remote add upstream git://develop.git.wordpress.org/
  5. Create a feature branch based on the Trac ticket (e.g. 12345) you want to work on: git checkout -b trac-12345
  6. Add commits for your fixes and git push (see also Caching your GitHub password in Git to prevent having to re-enter your GitHub password each time).
  7. Go to GitHub and open a pull request to your master branch.
  8. With the newly-created pull request in hand, copy the URL and paste it into a new comment on WordPress Trac and solicit for feedback. Ideally you should also attach a diff of your patch, and again you can do this just by adding “.diff” to any pull request URL, for example: https://github.com/xwp/wordpress-develop/pull/61.diff