Block 0 is the first class in the WordPress plugin development series.
Links To Things
In our first class we worked together to setup our environments on Windows and MacOS.
We mostly followed the install guide from VVV including:
- Install VirtualBox
- Install Vagrant
- Install VVV
- Run the vagrant up command
Copying all the install apps from the USB drive made that part faster. Many of the installers we had were bootloaders and soon went online to download the “real app”.
Using Windows? Make sure you turn ON your virtualization option in the BIOS.
Install VirtualBox from the downloaded app.
VirtualBox is has a GUI interface for managing your virtual machines. You should not need to play with it. If you change settings for one of the Vagrant-built virtual machines it can break the machine. The vagrant up –provision or vagrant reload –provision commands can help fix it.
VirtualBox is a binary executable app.
Vagrant Installer on Windows should have all options checked during the install. It has a GUI installer but is a command-line app once installed. It is built on Ruby, but with VVV you don’t really need to know that.
The first run on the installer may ask to install the hosts updater plugin. Do that. You will need to run the Vagrant Installer again to install the main Vagrant app.
After installation you can try typing vagrant -v from the command line to make sure vagrant is running.
The VVV installer can be pulled with a git clone but it is easier to start by downloading the source zip. Download the latest source code zip file an unzip it to an easy-to-type-and-remember directory.
Vagrant will populate that folder with Vagrant configuration and helper scripts to a folder, most notably Vagrantfile, to help tell Vagrant how to configure a virtual machine for WordPress. Use these commands to get things started. You want to start from the folder where you unzipped VVV , you’ll know you have the right folder if you see a Vagrantfile file there. Do this from the command line:
cd <vagrant-unzip-folder-name> vagrant up
This is where things take a while. The VVV scripts instruct Vagrant to download the Ubuntu image along with all the libraries needed to make WordPress development work. That includes PHP, Maria DB (MySQL), nginx, and the WordPress source.
This is where things take a while with 5 people doing vagrant up at the same time on the same network. The virtual image is a BIG install. We will figure out how to put this on a NAS for a direct in-classroom install next time.
If All Goes Well…
If everything is setup properly you can check the install on your laptop by using your daily browser app and surfing to
You can check the admin setup by going to http://one.wordpress.test/wp-admin/ and login with the username admin passworhttps://varyingvagrantvagrants.org/docs/en-US/default-credentials/d password. You can find this login and other useful info about your new WordPress Virtual Machine on the VVV installation details page.
An Unresolved Issue
One of our students on a Windows HP laptop was running into an odd SSH validation issue when trying to run vagrant up — we will post notes here as we learn more.
A github issues note on how to move VVV between boxes including an up-and-running virtual machine image and all the VVV metadata.
And a Stack Overflow explanation on how to copy over an install. Their “clean way” is only the “instructions” on now to setup the box and will not avoid the huge download of the ISO and data sets. The “dirty way” is likely better for our LAN + NAS or server approach.