Coolest Guides on the Planet

coolest guides on the planet

Coolest Guides On The Planet

  • Home
  • macOS
  • WebDev
  • All Posts
  • Contact

Setting up VVV Varying Vagrant Vagrants on macOS

May 10, 2017 14 Comments

This is a 4 part reference guide to getting started with Vagrant, VVV and WordPress.
This is Part 2 – Setting up VVV Varying Vagrant Vagrants on macOS

Vagrant and WordPress Local Development

  • Vagrant – Getting Started on macOS
  • Vagrant and WordPress – Setting up VVV Varying Vagrant Vagrants on macOS
  • Vagrant and WordPress – Adding Multiple Sites with VVV Base
  • Vagrant and WordPress – Easy Admin Page

vvvVagrant is a very powerful development tool that allows you to use virtual images referred to as boxes to use as your local development environment.

You can download and use a number of virtual ‘boxes’ with the aid of a virtual machine application like the free VirtualBox, you can also create and share your own boxes with colleagues via the Vagrant Cloud.

Some good folks have got together and released a virtual box image suitable for local WordPress development called VVV aka Varying Vagrant Vagrants.

Install Virtual Box and Vagrant

First things first, the base tools need to be installed; Virtual Box and Vagrant itself, follow the Virtual Box instructions to install that, and then Vagrant.

Installing VVV Varying Vagrant Vagrants

Key components that you get in your VVV Box

  • nginx (mainline version)
  • MariaDB 10.1.x (drop-in replacement for MySQL)
  • php-fpm 7.0.x
  • WP-CLI (master branch)
  • memcached
  • PHPUnit
  • Composer
  • NodeJs
  • Mailcatcher

You get all the above and some more which cover the full gamut of WordPress theme and plugin development. Before you install the main VVV it’s best to install 2 needed plugins.

Install Vagrant Plugins

The GitHub instructions for VVV say these steps for 2 or 3 plugins are optional, which they are, but to have VVV up and running without further configuration it’s best to install these plugins prior to running vagrant up otherwise you will need to do further configuration to get Nginx, PHP and MySQL running.

Navigate in hour home directory.

cd

Vagrant Hosts

vagrant plugin install vagrant-hostsupdater

Install this plugin which will add the required host mapping on your /etc/hosts file for the default local development URLs

Vagrant Scripts

vagrant plugin install vagrant-triggers

This plugin allows specific VVV scripts to fire on boot and on halt of the virtual image for example it will back up your databases when vagrant is halted or shut down.

VirtualBox Guest Plugin

vagrant plugin install vagrant-vbguest

If you get errors installing the plugins, most of these related to network timeouts, just repeat the process. Don’t worry about the location of where you filing at this point as these are global plugins.

vagrant-plugins

Install VVV – Varying Vagrant Vagrants

If you are comfortable with Git you can clone the repo locally,  otherwise download the zip archive from GitHub  VVV-develop.zip to your downloads directory, unzip it and rename it to ‘VVV’. You can leave it in Downloads or move it to another location. The ‘develop’ branch is actually the latest VVV2 version, the ‘master’ branch is the previous version.

I would recommend making the install in a folder in your home directory – to get to your home directory just run cd on the command line.

I currently use the develop branch as it has the latest fixes and is very active – if you prefer you can also use the master branch.

To clone the github repo VVV on your local machine – for the develop branch us:

git clone -b develop git://github.com/Varying-Vagrant-Vagrants/VVV.git

or master…

git clone -b master git://github.com/Varying-Vagrant-Vagrants/VVV.git

Your cloned directory will be named VVV or name it something else… in the case below, it’s named vagrant-local

git clone -b develop git://github.com/Varying-Vagrant-Vagrants/VVV.git vagrant-local

or master…

git clone -b master git://github.com/Varying-Vagrant-Vagrants/VVV.git  vagrant-local

yosemite-vagrant-download

Booting up VVV

In this example the VVV directory is filed in the home folder – in Terminal change directory into the folder

cd ~/VVV

Launch VVV

vagrant up

vvv-install-macos-2

Start VVV by issuing the above ‘vagrant up’ command. Output should be similar to and ongoing:

neilg@[~/VVV]: vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
    default: URL: https://vagrantcloud.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v14.04) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/trusty64/version/1/provider/virtualbox.box
    default: Progress: 76% (Rate: 1462k/s, Estimated time remaining: 0:01:25)

This is the all powerful Vagrant command, the first time you run it, it will go to the Vagrant cloud and download the needed resources to boot the new VVV virtual machine in a standalone full development environment, this will take some time depending on your internet connection, maybe time for a brew, subsequent boots in the same directory will be much quicker as the core files will have already been downloaded and cached.

Now everything is installed, in your browser go to http://vvv.dev/ to see your sites.

vvv2-dev-vagrant

The below sites are installed by default and are located in your browser as:

  • http://local.wordpress.dev/ for WordPress stable
  • http://src.wordpress-develop.dev/ for trunk WordPress development files
  • http://build.wordpress-develop.dev/ for the version of those development files built with Grunt

As well as some links to some web dev tools on your Vagrant VM Box including phpmyadmin, phpinfo and mailcatcher.

 

Usernames and  Passwords

To access the back-end of WP & MySQL the logins are below:

WordPress WP-Admin login username/password instances are 

admin
password

MySQL db and dbUser/password is

wp
wp

MySQL root user/password is

root
root

That’s it, the Vagrant VVV instance can be shutdown with vagrant halt and booted with vagrant up – to totally remove it you can run vagrant destroy.

Logging In To the VM Box

To access the virtual box (optional), you do so via SSH and the mirror directory to your current working vagrant directory after login is in the root at /vagrant

vagrant ssh
cd /vagrant

Run a ls command to see that content

vagrant@vvv:~$ cd /vagrant

vagrant@vvv:/vagrant$ ls -la
total 56
drwxr-xr-x  1 vagrant vagrant   442 Jul 17 04:40 .
drwxr-xr-x 1 vagrant vagrant 680 Mar 2 2017 .
drwxr-xr-x 23 root root 4096 Mar 2 07:41 ..
-rw-r--r-- 1 vagrant vagrant 15785 Mar 2 07:28 CHANGELOG.md
drwxr-xr-x 1 vagrant vagrant 578 Mar 2 07:48 config
drwxr-xr-x 1 vagrant vagrant 238 Mar 2 07:28 database
drwxr-xr-x 1 vagrant vagrant 102 Mar 2 07:28 docs
-rw-r--r-- 1 vagrant vagrant 6148 Mar 2 2017 .DS_Store
drwxr-xr-x 1 vagrant vagrant 408 Mar 2 07:28 .git
-rw-r--r-- 1 vagrant vagrant 69 Mar 2 07:28 .gitattributes
drwxr-xr-x 1 vagrant vagrant 136 Mar 2 07:28 .github
-rw-r--r-- 1 vagrant vagrant 1849 Mar 2 07:28 .gitignore
-rw-r--r-- 1 vagrant vagrant 1107 Mar 2 07:28 LICENSE
drwxr-xr-x 1 vagrant vagrant 102 Mar 2 07:28 log
drwxr-xr-x 1 vagrant vagrant 238 Mar 2 08:06 provision
-rw-r--r-- 1 vagrant vagrant 6973 Mar 2 07:28 README.md
drwxr-xr-x 1 vagrant vagrant 102 Mar 2 07:36 .vagrant
-rw-r--r-- 1 vagrant vagrant 17815 Mar 2 07:28 Vagrantfile
-rw-r--r-- 1 vagrant vagrant 675 Mar 2 07:28 vvv-config.yml
-rw-r--r-- 1 vagrant vagrant 64 Mar 2 07:28 wp-cli.yml
drwxr-xr-x 1 vagrant vagrant 238 Mar 2 2017 www

Your sites are in www directory, which is the same on your host – ~/VVV/www

I have a similar all in one article on WP Beaches website to get VVV and WordPress up to speed on a local Vagrant/WordPress workflow.

Cats: WebDev, WebRoot, WordPress

Tags

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls

Donate a Beer to the Coolest Guides

Get Beaver Builder Now!

Discuss

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls
Get DesktopServer

Lynda

Lynda.com Online Training Videos

TreeHouse

smlinks

Learn WordPress
osx-modify-shell-path

How to Add to the Shell Path in macOS Big Sur and Catalina using Terminal

October 19, 2019

virtual-hosts osx 10.10 yosemite

Set up Virtual Hosts on macOS Catalina 10.15 in Apache

October 19, 2019

Installing Homebrew on macOS Catalina 10.15, Package Manager for Linux Apps

October 18, 2019

Where is the bash shell in macos Catalina?

October 12, 2019

Refine your search

  • All
  • Modules
  • Themes
  • Documentation
  • Forums & Issues
  • Groups

RSS ars technica

  • Breaking down why Apple TVs are privacy advocates’ go-to streaming device
  • Musi says evidence shows Apple conspired with music industry on App Store ban
  • Trump threatens Apple with 25% tariff to force iPhone manufacturing into US
  • I helped a lost dog’s AirTag ping its owner: An ode to replaceable batteries
  • Apple legend Jony Ive takes control of OpenAI’s design future

RSS mac surfer

  • Tot is new text editor for Mac, iPhone, and iPad focused on constraints and ease of use
  • TiPbITS: Google Drive Sorting Can Hide New Documents
  • How to take a screenshot on a MacBook Pro
  • How To Create Simple Animation With Mac Keynote
  • Last Week on My Mac: Virus pandemics

Donate

Copyright © 2025· Neil Gee - All Rights Reserved - Hosted by Runcloud

Copyright © 2025 · gee on Genesis Framework · WordPress · Log in