layout | title | og_url | og_image | description |
---|---|---|---|---|
default |
VCCW - A WordPress development environment. |
VCCW is a Vagrant based development environment for WordPress plugins, themes, or websites. |
This is a Vagrant configuration designed for development of WordPress plugins, themes, or websites.
VCCW includes customizable variables for setting the WordPress version (or beta release), language, hostname, subdirectory, admin credentials, default plugins, default theme, multisite, SSL and other options. These variables give you a lot of flexibility in tailoring your development environment to your specific needs.
- Ubuntu 16.04 Xenial64
- Subversion
- Git
- jq
- WP-CLI & WordPress
- PHP 7
- MySQL 5.7.x
- Apache 2.4.x
- NodeJS latest
- Ruby 2.3
- Vagrant 1.8.6 or later
- VirtualBox 5.1.6 or later
{{ site.scroll_to_top }}
$ vagrant plugin install vagrant-hostsupdater
Windows does not allow to change hosts
files. Please add vccw.test 192.168.33.10
by yourself!
$ vagrant box add vccw-team/xenial64
Download.zip
$ cd vccw-x.x.x
$ vagrant up
Visit http://vccw.test/ or http://192.168.33.10/
{{ site.scroll_to_top }}
This tool installs a WordPress environment with these settings by default.
- Default user
- Username:
admin
- Password:
admin
- Username:
- MySQL Host:
127.0.0.1
- Username:
wordpress
orroot
- Password:
wordpress
- Port:
3306
- Host:
vccw.test
or192.168.33.10
- Username:
vagrant
- Password:
vagrant
- Port:
22
You can login virtual machine with vagrant ssh
.
{{ site.scroll_to_top }}
VCCW is configured for those developing WordPress plugins, themes or websites. It includes many customizable variables for setting the WordPress version (or beta release), language, hostname, subdirectory, admin credentials, default plugins, default theme, multisite, SSL and other options. These variables give you a lot of flexibility in tailoring your development environment to your specific needs.
Copy provision/default.yml
to site.yml
like following.
$ cp provision/default.yml site.yml
Then edit the site.yml
and run vagrant up
.
Or place the site.yml
and put variables like following.
hostname: example.com
ip: 192.168.33.11
lang: ja
plugins:
- contact-form-7
- jetpack
theme: twentysixteen
Then just run vagrant up
.
VCCW has a series of global parameters which work with all virtual machines.
They can be specified ~/.vccw/config.yml
like following.
memory: 1024
cpus: 2
lang: ja
theme_unit_test: true
{{ site.scroll_to_top }}
You can place shell scripts, so it will run at pre/post provisioning.
provision-pre.sh
- Run before chef provisioning.provision-post.sh
- Run after chef provisioning.
provision-post.sh
- It will run after provisioning.
#!/usr/bin/env bash
set -ex
/usr/local/bin/wp --path=/var/www/wordpress plugin install contact-form-7 --activate
This example script will install and activate plugin "Contact Form 7" by WP-CLI.
Also, you can use Ansible.
provision-post.yml
- It will run after provisioning.
- hosts: all
become: yes
tasks:
- name: Ensure nginx is installed
apt: pkg=nginx state=latest
{{ site.scroll_to_top }}
MailCatcher re-routes all WordPress emails to Mailcatcher.
Please visit: http://vccw.test:1080/
We developed a community command that generates a VCCW environment.
https://github.com/vccw-team/scaffold-vccw
$ wp package install vccw/scaffold-vccw:@stable
Generate a VCCW environment into the wp.dev
directory.
$ wp scaffold vccw wp.dev
Generating: 100% [===========================] 0:03 / 0:06
Success: Generated.
$ cd wp.dev
$ vagrant up
$ wp help scaffold vccw
NAME
wp scaffold vccw
DESCRIPTION
Generate a new VCCW environment.
SYNOPSIS
wp scaffold vccw <directory> [--host=<hostname>] [--ip=<ip-address>]
[--lang=<language>]
OPTIONS
<directory>
The directory of the new VCCW based guest machine.
[--host=<hostname>]
Hostname of the guest machine. Default is `vccw.test`.
[--ip=<ip-address>]
IP address of the guest machine. Default is `192.168.33.10`.
[--lang=<language>]
Language of the WordPress. Default is `en_US`.
EXAMPLES
$ wp scaffold vccw wordpress.dev
Generating: 100% [===========================] 0:03 / 0:06
Success: Generated.
$ wp scaffold vccw wordpress.dev --lang=ja
Generating: 100% [===========================] 0:03 / 0:06
Success: Generated.
https://github.com/vccw-team/vccw/releases
{{ site.scroll_to_top }}