Pick our brains...

Summary for Setting Up A Local WordPress Dev Environment Using VVV

This is meant to be a high level walk through for setting up a local development environment for WordPress.

Steps

  1. Install Git
  2. Install Virtual Machine Software (Virtualbox 4.3.x)
  3. Install Vagrant
    1. Install Vagrant Core 1.6.3
    2. Install Vagrant Plugins
      1. Hosts Updater Plugin : https://github.com/cogitatio/vagrant-hostsupdater
      2. Triggers : https://github.com/emyl/vagrant-triggers
      3. Note: While the above plugins are technically not required to use Vagrant, or even VVV, they do make some Vagrant tasks easier, and enable enhanced functionality within VVV.
  4. GIT Clone VVV Repo
    1. Note: the VVV repo has many of the previous steps outlined on their project page: https://github.com/Varying-Vagrant-Vagrants/VVV#the-first-vagrant-up
  5. Bring up the virtual machine
    1. cd VVV
    2. vagrant up
    3. Note: The first time this command is issued, the setup will take a significant amount of time. Vagrant will be downloading a server image (currently Ubuntu 14.04), turning that server ‘on’, and downloading the various packages needed to create. Be patient. Go get a coffee. For a good summary of what is going on, see VVV’s summary.
    4. To ‘shutdown’ the server, simply issue vagrant halt
    5. Subsequent ‘vagrant up‘ commands should bring the machine up quickly, unless provisioning needs to be done. This provisioning can be initialized by executing vagrant up –provision
    6. You can access your machine via SSH by executing vagrant ssh
    7. From inside the virtual machine, the web files can be navigated to: cd /srv/www. Otherwise, those same files can be accessed from the host machine under VVV/www

 

From here, going to http://local.wordpress.dev should take you to a fresh WordPress installation. The default WP username and password areadmin / password. Obviously these need to be changed if the content from this database is used in a production setting. For a full list of the credentials associated with this server, see the VVV documentation.

 

Scaffolding New Projects

At this point we have a perfectly good place to install plugins, install themes, and do general dev work with http://local.wordpress.dev.

VVV is setup in a way that allows for easily creating new dev sites. There are a number of tools created by the community to help, but my favorite is Alison Barrett’s Site Wizard. This allows you to issue a command in your VVV directory: vvv -a create and be prompted for various things needed to setup a new, local, dev site.