How To Setup The WordPress Meta Environment Using VVV
Note: As with most software, VVV has changed a lot since this post was written. I haven’t used it for years, but you may wish to refer to Tom J Norwell’s comment.
When you are an organiser for an upcoming WordCamp, it is a good idea to have an understanding of how the WordCamp sites work before playing with a live one. The best way to do that is to set up the WordPress Meta Environment locally with VVV. Setting the environment up locally allows you to play around with the sites locally without worrying about breaking a live site or accidentally emailing subscribers with testing data.
While the documentation for VVV and the WordPress Meta Environment are good, I found they weren’t quite comprehensive enough and I ran into a couple of issues trying to set it up.
Setting up the WordPress Meta Environment with VVV
First, you’ll need to install VVV. You’ll also need to install a couple of prerequisites (Vagrant and VirtualBox). Then you can clone VVV from your console.
Then you’ll need to install the Vagrant Hostsupdater plugin so that you don’t have to play around with your hosts file to get the local URLs to work.
The next step is the clone the WordPress Meta Environment. This will pull down files for a number of sites in the WordPress network.
Now that the files have been pulled down, the databases for the different sites need to be copied into the backups folder. This is so Vagrant will populate the databases when it provisions.
The database files copied over above don’t include commands to actually create the databases, and will fail if it tries to populate databases that don’t exist (see issue #36). Save this file into the database
folder, which will also run on provision.
Now that everything has been set up, we can boot up our virtual machine.
Provisioning will take quite a while. For me it took well over an hour the first time provisioning VVV.
Once that has completed visit http://wp-meta.dev/ to view a list of all the available WordPress meta sites.
Creating A New WordCamp Site
By default, the meta environment includes central.wordcamp.org and 2014.seattle.wordcamp.org. If you want to add a new WordCamp site, make sure to add the address to the WordCamp hosts file (in my case, 2017.brisbane.wordcamp.dev). If Vagrant is already running you’ll then need to run $ vagrant reload
for the change to the hosts file to apply.
Hopefully this guide can help others avoid the issues I ran into when I first attempted to set up VVV and the WordPress Meta Environment.