SlideShare a Scribd company logo
1 of 56
Download to read offline
VCCWWordPress development environment
Takayuki Miyauchi
2015/05/16
at WordBench Osaka
Summary
Vagrant based development environment for theme and plugin developer.
http://vccw.cc/
28,000+
downloads
50+
Provisions / day
18
contributors
Thanks a lot !!
326
commits
285
★ Stars
What’s installed
• CentOS 6.5
• Subversion
• Git
• jq
• Apache 2.2.x
• MySQL 5.5.x
• PHP 5.4
• PHPUnit
• Code Sniffer
• Composer
• WordPress 3.5+
• WP-CLI
• WordPress i18n Tools
• WordPress Coding Standards for
PHP_CodeSniffer
• WordPress Unit Test Framework
• Node.js
• Grunt
• Gulp
• Ruby
• Bundler
• Sass
• Wordmove
How to use
1. Install VirtualBox
2. Install Vagrant
3. Install the vagrant-hostsupdater plugin. (Optional)

$ vagrant plugin install vagrant-hostsupdater
4. Download vagrant box

$ vagrant box add miya0001/vccw
5. Download the latest .zip from vccw.cc
6. change into a directory

$ cd vccw-x.x.x
7. Just run!

$ vagrant up
Customizing
vccw-x.x.x/site.yml
version: latest
lang: ja
plugins:
- contact-form-7
- jetpack
theme: twentyfifteen
See provision/default.yml
~/.vccw/config.yml
lang: ja
memory: 1024
cpus: 2
You can overwrite default
provision-post.sh
#!/usr/bin/env bash
set -ex
/usr/local/bin/wp db import /vagrant/backup.sql
Wordmove
deployment
• Pulls your WordPress data from server to VCCW.

$ wordmove pull --all
• Pushes your WordPress data from VCCW to server.

$ wordmove push --all
Staging / Production
$ wordmove pull --all -e staging
$ wordmove push --all -e production
WP-CLI
Creating a new plugin.
$ vagrant ssh -c "wp scaffold plugin my-plugin --activate"
Success: Created /var/www/wordpress/wp-content/plugins/my-plugin
Success: Created test files.
Success: Plugin 'my-plugin' activated.
$ wp scaffold plugin my-plugin --activate
Creating a theme from _s.
$ vagrant ssh -c "wp scaffold _s my-theme --activate"
Success: Created theme 'My-theme'.
Success: Switched to 'My-theme' theme.
$ wp scaffold _s my-theme --activate
Creating a child theme.
$ vagrant ssh -c "wp scaffold child-theme my-child-theme 

--parent_theme=twentyfifteen --activate"
Success: Created /var/www/wordpress/wp-content/themes/my-child-
theme
Success: Switched to 'My-child-theme' theme.
$ wp scaffold child-theme my-child-theme 

--parent_theme=twentyfifteen --activate
Automated testing
$ vagrant ssh -c "wp scaffold plugin-tests my-plugin"
Success: Created test files.
Creating a test files
$ tree www/wordpress/wp-content/plugins/my-plugin/
www/wordpress/wp-content/plugins/my-plugin/
├── .travis.yml
├── Gruntfile.js
├── bin
│   └── install-wp-tests.sh
├── my-plugin.php
├── package.json
├── phpunit.xml
├── readme.txt
└── tests
├── bootstrap.php
└── test-sample.php
Write the plugin tests
<?php
class SampleTest extends WP_UnitTestCase
{
function test_sample()
{
$this->assertEquals(
'Hello Hanako!',
do_shortcode( "[hello]Hanako[/hello]" )

);
}
}
[vagrant@vccw my-plugin]$ phpunit
Installing...
...
Configuration read from /var/www/wordpress/wp-content/
plugins/my-plugin/phpunit.xml
.
Time: 1.73 seconds, Memory: 12.50Mb
OK (1 test, 1 assertion)
Run the plugin tests
Simple Map
https://github.com/miya0001/simple-map/blob/master/tests/test-simple-map.php
oEmbed Gist
https://github.com/miya0001/oembed-gist/blob/master/tests/test-oebmed-gist.php
CI
Continuous Integration
Edit the .travis.yml
php:
- 5.3
- 5.4
- 5.5
- 5.6
env:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=4.1 WP_MULTISITE=0
- WP_VERSION=4.0 WP_MULTISITE=0
- WP_VERSION=3.9 WP_MULTISITE=0
- WP_VERSION=3.8 WP_MULTISITE=0
$ git push
Advanced tips
$ npm install grunt-init -g
$ mkdir ~/.grunt-init
$ git clone --recursive git@github.com:vccw-team/grunt-vccw.git 
~/.grunt-init/vccw
$ mkdir myproject.dev
$ grunt-init vccw
$ vagrant up
grunt-init for VCCW
Setup
Provision
Running Serverspec tests
$ git clone git@github.com:vccw-team/vccw.git
$ cd vccw

$ bundle install --path vendor/bundle
$ bundle exec rake spec
Command "wp option get blogdescription"
exit_status
should eq 0
stdout
should eq "Hello VCCW.n"
Finished in 13.25 seconds (files took 7.04 seconds to load)
76 examples, 0 failures
Another Vagrant
for WordPress
VVV

https://github.com/Varying-Vagrant-Vagrants/VVV
Chassis
https://github.com/Chassis/Chassis
bedrock-ansible
https://github.com/roots/bedrock-ansible
Mercury Vagrant (HGV)

https://github.com/wpengine/hgv
vip-quickstart
https://github.com/Automattic/vip-quickstart
wordpress-meta-environment

https://github.com/iandunn/wordpress-meta-environment
Information
AMIMOTO HHVM
is available!!
Thanks!!

More Related Content

What's hot

Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Christopher Bumgardner
 

What's hot (20)

Web Applications with Eclipse RT and Docker in the Cloud
Web Applications with Eclipse RT and Docker in the CloudWeb Applications with Eclipse RT and Docker in the Cloud
Web Applications with Eclipse RT and Docker in the Cloud
 
Vagrant presentation
Vagrant presentationVagrant presentation
Vagrant presentation
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with Vagrant
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized Development
 
Vagrant
VagrantVagrant
Vagrant
 
GlassFish Embedded API
GlassFish Embedded APIGlassFish Embedded API
GlassFish Embedded API
 
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As CodeDevops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code
 
Using vagrant
Using vagrantUsing vagrant
Using vagrant
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
 
Deploy Node.js application in Heroku using Eclipse
Deploy Node.js application in Heroku using EclipseDeploy Node.js application in Heroku using Eclipse
Deploy Node.js application in Heroku using Eclipse
 
Introduction to Express and Grunt
Introduction to Express and GruntIntroduction to Express and Grunt
Introduction to Express and Grunt
 
Dockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/WindowsDockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/Windows
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ Benetech
 
Node4J: Running Node.js in a JavaWorld
Node4J: Running Node.js in a JavaWorldNode4J: Running Node.js in a JavaWorld
Node4J: Running Node.js in a JavaWorld
 
Building (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with PackerBuilding (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with Packer
 
Vagrant
Vagrant Vagrant
Vagrant
 
"Wix Serverless from inside", Mykola Borozdin
"Wix Serverless from inside", Mykola Borozdin"Wix Serverless from inside", Mykola Borozdin
"Wix Serverless from inside", Mykola Borozdin
 
Vagrant
VagrantVagrant
Vagrant
 
Vagrant 101 Workshop
Vagrant 101 WorkshopVagrant 101 Workshop
Vagrant 101 Workshop
 
Multiple django applications on a single server with nginx
Multiple django applications on a single server with nginxMultiple django applications on a single server with nginx
Multiple django applications on a single server with nginx
 

Similar to VCCW - Vagrant based WordPress development environment

Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShiftKubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Mihai Criveti
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Carlos Sanchez
 

Similar to VCCW - Vagrant based WordPress development environment (20)

Vagrant WordCamp Hamilton
Vagrant  WordCamp HamiltonVagrant  WordCamp Hamilton
Vagrant WordCamp Hamilton
 
Advanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.comAdvanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.com
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
WordPress Meetup at HUBBA Thailand
WordPress Meetup at HUBBA ThailandWordPress Meetup at HUBBA Thailand
WordPress Meetup at HUBBA Thailand
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
 
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShiftKubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
 
Manage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cliManage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cli
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
High performance WordPress
High performance WordPressHigh performance WordPress
High performance WordPress
 
Modern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSDModern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSD
 
A new way to develop with WordPress!
A new way to develop with WordPress!A new way to develop with WordPress!
A new way to develop with WordPress!
 
The WordPress developer's toolkit
The WordPress developer's toolkit The WordPress developer's toolkit
The WordPress developer's toolkit
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
Professional deployment
Professional deploymentProfessional deployment
Professional deployment
 
Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016
 
Automated Infrastructure and Application Management
Automated Infrastructure and Application ManagementAutomated Infrastructure and Application Management
Automated Infrastructure and Application Management
 
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cliWordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
WordCamp Vancouver 2012 - Manage WordPress with Awesome using wp-cli
 
Automated testing with Drupal
Automated testing with DrupalAutomated testing with Drupal
Automated testing with Drupal
 
Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016
 

More from Takayuki Miyauchi

More from Takayuki Miyauchi (20)

オープンソースによるイノベーションの継続
オープンソースによるイノベーションの継続オープンソースによるイノベーションの継続
オープンソースによるイノベーションの継続
 
I love Automation
I love AutomationI love Automation
I love Automation
 
え?まだMAMPで消耗してんの?
え?まだMAMPで消耗してんの?え?まだMAMPで消耗してんの?
え?まだMAMPで消耗してんの?
 
WordPress on HHVM + Hack
WordPress on HHVM + HackWordPress on HHVM + Hack
WordPress on HHVM + Hack
 
オープンソース & オープンデータ
オープンソース & オープンデータオープンソース & オープンデータ
オープンソース & オープンデータ
 
WordPress開発の最新事情
WordPress開発の最新事情WordPress開発の最新事情
WordPress開発の最新事情
 
Cybozu Kintone x WordPress
Cybozu Kintone x WordPressCybozu Kintone x WordPress
Cybozu Kintone x WordPress
 
WordPressプラグインを公開しよう!
WordPressプラグインを公開しよう!WordPressプラグインを公開しよう!
WordPressプラグインを公開しよう!
 
JAWS-UG Kansai 特別編 AWSがあるとき。ないとき。
JAWS-UG Kansai 特別編 AWSがあるとき。ないとき。JAWS-UG Kansai 特別編 AWSがあるとき。ないとき。
JAWS-UG Kansai 特別編 AWSがあるとき。ないとき。
 
初心者向けWordPress DB & Performance
初心者向けWordPress DB & Performance初心者向けWordPress DB & Performance
初心者向けWordPress DB & Performance
 
AWS+WordPressでつくるFirefoxアプリ
AWS+WordPressでつくるFirefoxアプリAWS+WordPressでつくるFirefoxアプリ
AWS+WordPressでつくるFirefoxアプリ
 
Ckan + AWS
Ckan + AWSCkan + AWS
Ckan + AWS
 
BookPress開発チームから見た 電子書籍の世界
BookPress開発チームから見た 電子書籍の世界BookPress開発チームから見た 電子書籍の世界
BookPress開発チームから見た 電子書籍の世界
 
WordBench Osaka 春の大翻訳祭り
WordBench Osaka 春の大翻訳祭りWordBench Osaka 春の大翻訳祭り
WordBench Osaka 春の大翻訳祭り
 
アプリケーションプラットホームとしてのWordPress
アプリケーションプラットホームとしてのWordPressアプリケーションプラットホームとしてのWordPress
アプリケーションプラットホームとしてのWordPress
 
WordPressで電子書籍
WordPressで電子書籍WordPressで電子書籍
WordPressで電子書籍
 
信頼性が高くハイパフォーマンスなテーマ開発テクニックでライバルに差をつけろ!
信頼性が高くハイパフォーマンスなテーマ開発テクニックでライバルに差をつけろ!信頼性が高くハイパフォーマンスなテーマ開発テクニックでライバルに差をつけろ!
信頼性が高くハイパフォーマンスなテーマ開発テクニックでライバルに差をつけろ!
 
WP Boosterの裏側
WP Boosterの裏側WP Boosterの裏側
WP Boosterの裏側
 
PHP-Ninjaの裏側
PHP-Ninjaの裏側PHP-Ninjaの裏側
PHP-Ninjaの裏側
 
WordPressのお作法
WordPressのお作法WordPressのお作法
WordPressのお作法
 

Recently uploaded

Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
MohammadAliNayeem
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
Kamal Acharya
 

Recently uploaded (20)

Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
 
Theory for How to calculation capacitor bank
Theory for How to calculation capacitor bankTheory for How to calculation capacitor bank
Theory for How to calculation capacitor bank
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of Arduino
 
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docx
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdf
 
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfBURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Introduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and ApplicationsIntroduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and Applications
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptx
 
Circuit Breaker arc phenomenon.pdf engineering
Circuit Breaker arc phenomenon.pdf engineeringCircuit Breaker arc phenomenon.pdf engineering
Circuit Breaker arc phenomenon.pdf engineering
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 

VCCW - Vagrant based WordPress development environment