Documentation VIP Quickstart

VIP Quickstart

Overview #

VIP Quickstart is a local development environment for WordPress.com VIP. It provides developers with an environment that closely mirrors WordPress.com along with all the tools we recommend developers use.

See also: The VIP Quickstart Github repository.

↑ Top ↑

Requirements #

Local

Server

  • Ubuntu 12.04
  • Git
  • Puppet

↑ Top ↑

Getting Started #

The first time you run the installer will be the slowest. This is because it has to download the virtual machine image, Ubuntu package updates, the full checkout of WordPress trunk, and the full VIP Plugins repository.

  1. git clone --recursive https://github.com/Automattic/vip-quickstart.git
  2. Set “10.86.73.80 vip.local” in your hosts file or configure Zeroconf
  3. Run vagrant up
  4. Go to http://vip.local in your browser, login with username: wordpress, password: wordpress

Windows #

  • Note: When you run the Git installer, make sure to install Git to your system PATH as the VIP Quickstart installer requires it.

  • If you receive a File cannot be loaded because the execution of scripts is disabled on this system error. Make sure you’re using a PowerShell interface. Use tools -> options to manage your default shell. (Right click on the repository and choose “Open a shell here”)

↑ Top ↑

Server #

    1. Add user with SSH key
    2. Install Puppet and Git
    3. git clone --recursive https://github.com/Automattic/vip-quickstart.git /srv
    4. sudo /srv/bin/vip-init --server [--domain=<domain>]

 

Since we turn off root logins and password logins via SSH, you’ll need to create another use and add an SSH key so you don’t get locked out of your server. ssh-copy-id is useful for copying ssh keys on Linux. There are similar tools for other platforms.

See also: Setting up Quickstart on Amazon Web Services.

↑ Top ↑

Zeroconf #

↑ Top ↑

OS X #

You already have Zeroconf

Windows #

If you have iTunes, you already have this. Otherwise, you need to install Bonjour.

Ubuntu

sudo apt-get install avahi-dnsconfd

↑ Top ↑

Configuration #

  • QUICKSTART_DISABLE_CONCAT – CSS and Javascript concatention are turned off if this is true.

↑ Top ↑

Default Usernames and Passwords #

↑ Top ↑

MySQL #

  • root:(blank)
  • wordpress:wordpress

↑ Top ↑

WordPress #

  • wordpress:wordpress

↑ Top ↑

Vagrant Primer #

The Vagrant CLI documentation will be useful for developers that haven’t used Vagrant before. Since VIP Quickstart is built on top of Vagrant, the Vagrant CLI commands will also work.

Some useful commands:

  • vagrant up – Start and provisions the VM
  • vagrant halt – Stops the VM
  • vagrant reload – Restarts and provisions the VM
  • vagrant provision – Provisions the VM
  • vagrant ssh – Logs into the VM with ssh
  • vagrant destroy – Deletes the VM

↑ Top ↑

phpMyAdmin #

VIP Quickstart comes with an installation of phpMyAdmin that allows you to view and query the MySQL database through a web browser. Once VIP Quickstart is running, you can access phpMyAdmin at http://vip.dev/phpmyadmin and use the MySQL username and password above to login.

Note that we do not recommend using phpMyAdmin for making changes to the MySQL database as a part of your development and testing work. Instead, use WordPress’s built-in functionality and API to query and manipulate data according to our best practices.

↑ Top ↑

Unit Testing #

VIP Quickstart comes with a checkout of the WordPress-Tests automated testing framework. You can use this to run the unit tests for WordPress itself or for any plugin or theme that has phpunit tests defined.

↑ Top ↑

To run the WordPress unit tests #

  • CD to /srv/www/wp-tests from within the VM.
  • Run phpunit

↑ Top ↑

To create unit tests for your plugin/theme #

  1. Navigate to your theme or plugin within the VM. (eg. /srv/www/wp-content/plugins/my-plugin)
  2. Use WP CLI to the generate the plugin test files. Eg. wp scaffold plugin-tests my-plugin
  3. Run phpunit inside your theme or plugin directory.
  4. Start building your tests within the newly created tests directory.