Installing VVV

Overview Overview

Varying Vagrant Vagrants is an open sourceOpen Source Open Source denotes software for which the original source code is made freely available and may be redistributed and modified. Open Source **must be** delivered via a licensing model, see GPL. 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.

For the official VVV instructions, visit the official VVV documentation here.

Top ↑

Running a Contributor DayContributor Day Contributor Days are standalone days, frequently held before or after WordCamps but they can also happen at any time. They are events where people get together to work on various areas of https://make.wordpress.org/ There are many teams that people can participate in, each with a different focus. https://2017.us.wordcamp.org/contributor-day/ https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/. Running a Contributor Day

If you’re running a contributor day for a WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more., you should use the contributor day set up script. Setting up a local environment over conference Wifi can cause problems for all, so the script generates a pre-built version.

This pre-built version comes with instructions and a full environment needed for contributor day. These then get copied on to USB drives and handed out at the beginning on contributor day. The entire process can be performed offline using only the contents of the USB drive.

Click here for information about the VVV contributor day USB drive generator

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 Hosts Updater 3. Installing Vagrant Hosts Updater

The vagrant-hostsupdater pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party will modify your hosts file so that provisioned domains such as http://vvv.test works. To install it, run;

vagrant plugin install vagrant-hostsupdater

Top ↑

4. Grabbing VVV 4. Grabbing VVV

There are official instructions for grabbing VVV are here.

Top ↑

4. Start up VVV 4. Start up VVV

  • In a command prompt, change to the directory VVV is installed to. You can sometimes drag and drop the folder on to the terminal as a fast way to type the path of the directory. If you are on Windows this must be a ran with elevated administrator priviledges.
  • 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:

Top ↑

5. Enabling Trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision. and The MetaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. Environment 5. Enabling Trunk and The Meta Environment

There are also 2 environments that are disabled by default:

  • http://trunk.wordpress.test/ An svn-based WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. trunk dev setup, useful for contributor days, TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets, patches, general core contributing, etc.
  • http://wpmeta.test A collection of sites for contributing to WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ and WordCamps

To enable these, open vvv-custom.yml, find skip_provisioning: true for the desired site, and change true to false. Save the file and reprovision to apply changes using vagrant reload --provision. This will take some time to run.

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

Top ↑

6. Create GitHubGitHub GitHub is a website that offers online implementation of git repositories that can can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ Repo (optional) 6. Create GitHub Repo (optional)

Pull requests on GitHub provide a convenient way to receive feedback and also to share the patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. for your contributions. You can add “.diff” to any pull request URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org and GitHub will return a diff file which you can then attach to a Trac ticketticket Created for both bug reports and feature development on the bug tracker.. You can also just add a link to the pull request in a Trac ticket comment. There is currently no GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com/. 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 SVNSVN Subversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase. repo with a Git one in VVV via: vagrant ssh -c /srv/www/wordpress-trunk/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-trunk/public_html && git remote set-url origin https://github.com/YOURNAME/wordpress-develop.git && git remote add upstream git://develop.git.wordpress.org/
  5. Check out the master branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch".: git checkout master
  6. Create a feature branch based on the Trac ticket (e.g. 12345) you want to work on: git checkout -b trac-12345
  7. 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).
  8. Go to GitHub and open a pull request to your master branch.
  9. 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

Last updated: