generator-vvv is a Yeoman generator that creates shareable WordPress installations for Varying Vagrant Vagrants.
At a high level, this generator creates a JSON file that describes your WordPress installation. Other developers can use that JSON file and this generator to create their own development environment that is exactly the same as yours.
You'll need this software to use generator-vvv
generator-vvv is a companion for Varying Vagrant Vagrants. If you aren't using VVV, it has huge benefits for local WordPress development, and we highly recommend it. However, this generator is really only useful for VVV users.
This is a Yeoman generator. Yeoman requires Node 0.8.19 or newer. It also requires Grunt and Yo, but we'll take care of those if you don't already have them.
Check that Node is installed:
$ node -v
npm install -g generator-vvv
We'll then go get a whole bunch of dependencies and you'll get time for a coffee break and a shiny new command line tool when you get back.
Note: if you're intending to contribute code back to the generator, you may want to clone the repo instead. See the contributing docs for details.
Starting directory:
cd
into Vagrant's www
directory.
$ mkdir yo-vvv-test
$ yo vvv:create
Follow the prompts. It will generate a vvv.json file. The generator uses the JSON file to bootstrap several scripts ultimately resulting in Vagrant re-provisioning and creating a new WordPress site. The vvv.json file can be shared, along with a databse export, and used by other developers with yo vvv:bootstrap
.
For more details, including how to set up an existing project, there is a more in-depth version of this guide.
If you've been lucky enough to be given a vvv.json file for a project, you're in good shape — and just a few minutes away from a development environment.
- Create an empty folder in Vagrant's
www
directory to house the project. - Put the vvv.json file you got inside that empty folder.
- Put a copy of the database (.sql or .sql.gz) into the folder with the JSON file.
Note: It's possible that you won't need a database. Check vvv.json file for a line that specifies a remote database URL. If specified, you can skip this step.
Be sure you have internet access and run:
$ yo vvv:bootstrap
The generator uses the JSON file to bootstrap several scripts, clone theme and plugin repositories, and ultimately end up with a development environment.
You may now navigate to the development environment domain. It's "URL" in vvv.json. If you don't have Vagrant's autohostupdater plugin installed, you'll need to enter the domain in your hosts file.
Username and password are both wordpress
- Working on WordPress: Editing themes & installing plugins.
- Creating a sharable project: In-depth setting up an existing project to make it sharable.
- Folder Structure: The file system result of running
yo vvv:bootstrap
. - Chain of Events: What happens when running
yo vvv:bootstrap
. - Development: How to contribute.
- Commands Reference: All of the
yo
andgrunt
commands available. - Rationale: Why we built this.