SlideShare a Scribd company logo
Varying WordPress
Development Environment
WordCamp Cincinnati 2016
#wccincy | #wcvwdeve
David Brattoli
Principal
Infinite Reality, LLC
Follow Along
• Want to follow along during the presentation.
Get the slides at:
http://bit.ly/2dGfgxS
About Me
• Web Developer for 7+ years. Including
2+ years of WordPress experience
• Owner of Infinite Reality LLC, a web
web and graphic design firm, since
since 2007 and have been working in
working in higher educationfor the
the last three years.
• Recently began teaching a Web
Design 2 class at Lorain County
Community College (Elyria, OH) with
with an emphasis on WordPress
• Built 6+ WordPress themes with
theme specific plugins
• Migrated and designed 6+ complete
sites with Wordpress
Topics
• Why use WordPress Local Development Environments
• Available WordPress Development Environments
• What is Varying Vagrant Vagrants ( VVV ) ?
• Why use Varying Vagrant Vagrants ( VVV ) ?
• Setting up a VVV local development environment
• Code Demo
• Styling the VVV development dashboard
• Taking development environment to the new
level with VV
• Code Demo
• Questions
Why use WordPress Local
Development Environments
• Faster. No waiting for files to upload via FTP or SSH before you
can refresh your browser and see your changes.
• Easier debugging. Because everything is running on your
system, setting up and using xDebug or other debugging tools
is quite a bit easier.
• Don’t need an internet connection work on things.
• When working locally, you’re free to experiment and play
around, as your work is not affecting current users.
• Allows you to get experience with working with a server
• Get to experience WordPress without having to commit to
buying hosting
Available Local WordPress
Development Environments
• Localhost
• MAMP ( Mac )/WAMP (Windows )
• XAMPP
• WordPress.comVIP
• DesktopServer (Windows & Mac )
• ServerPress
• Docker
• Vagrant/VVV
What is Varying Vagrant Vagrants (
VVV ) ?
• Vagrant is a toolkit that runs on top ofVirtualBox,
VMWare, or another virtual machine provider on your
local machine.Vagrant will allow you to work with these
virtual machines to run your code, while you keep your
entire workflow on your local computer.
• VaryingVagrantVagrants is aVagrant setup that provides
a great start for localWordPress development. Whether
you’re building plugins, themes, or full site, a localVVV
installation is the best place to do your development.
Why use Varying Vagrant Vagrants (
VVV ) ?
• Works on both Mac andWindows
• Customizable
• Easy on your computer’s RAM
• Easy site creation withVVV pluginVV
• It is what theTheme Review and other majorWordPress
contribut0rs use
• No internet required to run except initial boot up
• Self-contained portable environment
Programs Needed
• Command Line Tool : Terminal ( Mac ) or Command
Prompt ( Windows ) or Git / GitBash ( Windows )
https://git-scm.com/downloads
• Virtualbox (you can substitute Vmware, but I find
Virtualbox easy to use and it’s free)
https://www.virtualbox.org/wiki/Downloads
• Vagrant
https://www.vagrantup.com/
• Git
https://git-scm.com/downloads
• Windows user will need to install RubyInstaller
package
http://rubyinstaller.org/
• Node.js
https://nodejs.org/en/
Setting up a VVV local
development environment
• Go to https://www.vagrantup.com/downloads.html
• Download Vagrant for your operating systems
• Install Vagrant
Step 1: Install Vagrant:
• Go to https://www.virtualbox.org/wiki/Downloads
• Download VirtualBox, for your operating systems, and download
VirtualBox Guest Additions, for version of downloaded
VirtualBox
• Install VirtualBox and VirtualBox Guest Additions
Step 2: Install VirtualBox and Guest
Additions:
Setting up a VVV local
development environment
• Open your command line tool ( For Windows 8 and above users
run the tool as a Administrator )
• Install the vagrant-hostsupdater plugin. In your command line
enter the following command:
“vagrant plugin install vagrant-hostsupdater”
and hit enter
• Vagrant-hostsupdater adds an entry to your /etc/hosts file on the host
system.
• OnVagrants Launch commands , it tries to add the information, if it
does not already exist in your hosts file. If it needs to be added, you will
be asked for an administrator password, since it uses sudo ( Mac) / run
as administrator ( windows ) to edit the file.
Step 2:Vagrant Plugins:
Setting up a VVV local
development environment
• Install the vagrant-triggers plugin. In your command line
enter the following command:
“vagrant plugin install vagrant-triggers”
and hit enter
• Vagrant-triggers allows the definition of arbitrary scripts that will
run on the host or guest before and/or afterVagrant commands.
• Default trigger is automated back-up of all SQL databases when
Vagrant is shutdown. Other examples “Blacklisting commands,
Skipping execution, andTrigger block DSL “
Step 2:Vagrant Plugins ( cont.. ):
Setting up a VVV local
development environment
• Install the vagrant-vbguest plugin. In your command line
enter the following command:
“vagrant plugin install vagrant-vbguest”
and hit enter
• Vagrant-vbguest keeps theVirtualBox Guest Additions kernel
modules of your guest synchronized with the version of your host
whenever you do vagrant up. This can prevent some subtle shared
folder errors.
Step 2:Vagrant Plugins ( cont.. ):
Setting up a VVV local
development environment
• There are two different methods for downloadingVVV.
1. Download theVVV using Git via command line
2. Downloading directly fromVVV Github page
https://github.com/Varying-Vagrant-Vagrants/VVV
Step 3: Downloading VVV:
Setting up a VVV local
development environment
• First things first you need to take a closer look at the VVV git command
git clone git://github.com/Varying-Vagrant-Vagrants/VVV.git
vagrant-local
• First is “git clone” . This is Git command that will retrieve the GitHub
repository ad download a clone into the directory you are in when the
command is initiated.
• Second is “git://github.com/Varying-Vagrant-Vagrants/VVV.git”. This
is the git url of the GitHub repository of VVV
• Lastly is “vagrant-local”. This is the name of the folder in which the
VVV files will be placed in. This is also important that the name of the
folder will become the name of the VVV environment once it is created.
So make to use a name that is easy to remember and will suit your dev
needs.
Step 3: Downloading VVV using Git:
Setting up a VVV local
development environment
• Open a Terminal Window
• Using the command line navigate to
the location on your computer in
which you want VVV installed using
the cd command
• Enter the following command:
git clone git://github.com/Varying-
Vagrant-Vagrants/VVV.git vagrant-
local
and hit Enter
• If Git is not already installed you will
be prompted by Terminal to install Git
• Once installed VVV will be
downloaded
• Download Git via
https://git-scm.com/downloads
• Install Git
• Open GitBash
• Using the command line navigate to
the location on your computer in
which you want VVV installed using
the cd command
• Enter the following command
git clone
git://github.com/Varying-Vagrant-
Vagrants/VVV.git vagrant-local
and hit Enter
MacWindows
Step 3: DownloadingVVV using Git:
Setting up a VVV local
development environment
• Using a internet browser navigate to
https://github.com/Varying-Vagrant-Vagrants/VVV
• Clink on the button labeled Clone or download
• Select download
• Once the file is downloaded, Unzip the file and Copy/Paste
it’s contents into the location in which you want to store your
VVV Dev environment files
• As with the Git command the name of the folder is important
do to the name of the folder will become the name of the
VVV environment once it is created. So make to use a name
that is easy to remember and will suit your dev needs.
Step 3: Downloading VVV directly from GitHub:
Setting up a VVV local
development environment
• Using your command line program navigate, using the cd command,
to the folder in which you stored the VVV files
• (Optional) At this time you can open VirtualBox if wish to see the box
entry being created
• Enter the following command
” vagrant up “
and hit enter
• Depending on your computer and your internet speed the installation
can take upwards of 5-10 minutes.
• Congratulations you now have you own Vagrant VVV Development
Environment
Step 4: Start the Vagrant environment :
Setting up a VVV local
development environment
• Now using your browser go to vvv.dev to see the dashboard of your
new VVV environment
• By default the Vagrant installation comes with four default
WordPress installs
• local.wordpress.dev for WordPress stable
• local.wordpress-trunk.dev for WordPress trunk
• src.wordpress-develop.dev for trunk WordPress development files
• build.wordpress-develop.dev for the version of those development
files built with Grunt
VVV Initial Vagrant Up Video
Because the initial installation can take a
lengthy amount of time based on internet
speed, here is a link to my first vagrant up
server so you see and compare to your
installation.
Video can be found at
https://www.youtube.com/watch?v=12HM6in1kOQ
Demo
Styling the VVV
development dashboard
• The initial VVV dashboard located at VVV.dev is very basic and
has no styling
• To correct this we will have to download custom dashboard files.
To see available options go to
https://github.com/Varying-Vagrant-Vagrants/VVV
and look at the section titled Custom Dashboards
• The dashboard I will be demo is by leogopal and is located at
https://github.com/leogopal/VVV-Dashboard
• As with the VVV download click the download link to download the
dashboard files
• Once downloaded Unzip and Copy the file dashboard-
custom.php and the folder titled dashboard
• Using Finder (Mac) / Explorer ( Windows ) navigate to
“name of your vagrant/www/default/” and then paste
• Now using your browser navigate to vvv.dev and when the page
loads you will see the new updated dashboard
Taking development environment to the
next level with VV
• By default the Vagrant installation comes with four default
WordPress installs.
• To create a new install you must first install VV - aVVV Site
Creation Wizard by Bradp located at:
https://github.com/bradp/vv
Taking development environment to the
next level with VV
• Clone vv to a folder somewhere.
• $ git clone https://github.com/bradp/vv.git
• Add that folder to your system path. See here if you need help.
• Open an explorer window and go to My Computer (orThis PC).
• Right click and choose properties
• Choose Advanced System Settings
• Choose EnvironmentalVariables form the AdvancedTab
• Choose the "Path" variable and edit it.
• Add a semicolon to end the previous path item and then add
the vv folder path (Example:;C:UsersNameDocumentsvv)
• Open Git Bash and run vv
* Alternately, you can use command prompt and use the
bash vv command. *
InstallingVV onWindows
Taking development environment to the
next level with VV
• Open Terminal
• Install HomeBrew
Go to http://brew.sh/ and copy the installation command.
It looks like this:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
• Paste the command into terminal and hit Enter
• Once homebrew is installed enter the following command into
terminal
brew install bradp/vv/vv
And hit Enter
InstallingVV on Mac
Taking development environment to the
next level with VV
• Open your command line tool: Terminal ( Mac) / GitBash or Command
Prompt (Windows)
• In you command enter the following command”
vv create
• You will then be prompted to enter the path to the location to the
directory of yourVVV installation
• Once completed a theVV site wizard will ask you a series of prompts to
create your new installation
• The prompts are as follows
• Name of new site directory: This is the name of the installation you wish
to create. It will also be the name of the folder in which the site will be
created
UsingVV
Taking development environment to the
next level with VV
• Domain to use (leave blank for nameofsitedirecoty.dev): This will be
the URL you will use to access the site. If you leave it blank the system
will automatically use the site directory name as the URL
• WordPress version to install (leave blank for latest version or trunk
for trunk/nightly version): This is were specify what version you wish
to use in the new site. If left blank it will grab the most recent
WordPress release
• Install as multisite? : The wizard has the ability to create the site a
multisite. If you answer yes to this question you then be prompted to
either choose to install a subdomain or subdirectory multisite
installation.
• Git repo to clone as wp-content (leave blank to skip): If you have a
GitHub repository you wish to attach to the site you can enter it here.
If don’t have one you can leave it blank
UsingVV ( cont. )
Taking development environment to the
next level with VV
• Local SQL file to import for database (leave blank to skip): This
prompt will allow you to either import a SQL database file to be used to
populate the new site or if left blank the wizard will create a blank SQL
file that will be populated by the WordPress install
• Remove default themes and plugins? : This prompt wants to know if
you wish to remove the defaultWordPress default themes (
Twentyfifteen orTwentysixteen) andWordPress default plugin Aksimet .
• Add sample content to site (y/N): This will allow you to populate the
WordPress install sample content to test yourWordPress themes and
plugins.The content used is the same used by the WordPressTheme
Review teams.
• EnableWP_DEBUG and WP_DEBUG_LOG (y/N): This will allow you to
either turn on or leave off the WordPress debug mode.
• You will then be shown a summary of your choices and will be prompted
to continue with the installation or not. Once you answer yes the wizard
will begin to install the newVVV site.
UsingVV ( cont. )
VV/VVV Commands
• Vagrant Up: Turns theVagrant InstallOn
• Vagrant Halt: Turns theVagrant Install OFF
• vv create: creates a new site
• vv list: displays a list of all available sites in yourVVV install
• vv delete site_name: Site deletion
For more information please check out
https://github.com/bradp/vv
https://github.com/Varying-Vagrant-Vagrants/VVV
Before you shut down
your computer
• Before shutdown you HAVE to shut down your vvv or
vagrant box by running:
vagrant halt
Questions?
David Brattoli
Web:
www.Infiniterealityllc.com
www.Dabrattoli.com
Twitter: @DavidMBrattoli
Email: davidbrattoli@yahoo.com
david.brattoli@infiniterealityllc.com
Github:
https://github.com/dabrattoli
Contact Information
Slides
SlidesCan be found at
http://www.slideshare.net/DavidBrattoli/varying-
wordpressdevelopmentenvironment-wccincy2016
OR
http://bit.ly/2dGfgxS
Want More?
• Stay tuned by following me onTwitter and my blog at
www.dabrattoli.com because I will be posting step by
step how to articles on everything I talked about today for
both Mac andWindows along otherWordPress
development topics.
Bonus Links
• Instructions to turn on code debugging such xDebug for
yourVVV box can found here:
https://github.com/Varying-Vagrant-
Vagrants/VVV/wiki/Code-Debugging
• Guide for SASS
http://sass-lang.com/guide
• GitHub For Beginners: Don’t Get Scared, Get Started
http://readwrite.com/2013/09/30/understanding-github-a-
journey-for-beginners-part-1/
Bonus Links
• How to Use Git forWordPress Development –
https://premium.wpmudev.org/blog/git-for-wordpress-
development/
• WP Pusher-
https://wppusher.com/
• The Ultimate GuideTo Automatic Updates
WithWP Pusher –
http://blog.wppusher.com/the-ultimate-guide-to-
automatic-updates-with-wp-pusher/
Resources Mentioned
 https://git-scm.com/downloads
 https://www.vagrantup.com/
 https://git-scm.com/downloads
 https://www.vagrantup.com/downloads.html
 https://www.virtualbox.org/wiki/Downloads
 https://git-scm.com/downloads
 https://github.com/Varying-Vagrant-Vagrants/VVV
 https://github.com/leogopal/VVV-Dashboard
 https://github.com/bradp/vv
 http://brew.sh/

More Related Content

PPTX
Varying WordPress Development Environment WordCamp Columbus 2016
PPTX
How To Set a Vagrant Development System
PDF
Instant ColdFusion with Vagrant
PPTX
Pp docker-swarm-doxlon-28th-march-2017
PDF
Introduction to jenkins
PPTX
Vagrant vs Docker
PDF
Vagrant + Docker provider [+Puppet]
PPTX
Introduction to apache maven
Varying WordPress Development Environment WordCamp Columbus 2016
How To Set a Vagrant Development System
Instant ColdFusion with Vagrant
Pp docker-swarm-doxlon-28th-march-2017
Introduction to jenkins
Vagrant vs Docker
Vagrant + Docker provider [+Puppet]
Introduction to apache maven

What's hot (20)

PDF
Introduction to ansible
PPTX
Varying wordpressdevelopmentenvironment wp-campus2016
PDF
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
PDF
Dev objective2015 lets git together
PDF
Production ready word press
PPTX
Automated ui-testing
PDF
Realtime with websockets
PPTX
CollabSphere 2018 - Java in Domino After XPages
PDF
Intro 2 docker
PDF
Introduction to docker
PPTX
Building an iOS Build Server
PPTX
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
PDF
Instant ColdFusion with Vagrant
KEY
Productivity 101: Making a Easily Re-deployable Dev Environment with Subversion
PDF
Docker and Puppet for Continuous Integration
PDF
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
PDF
Vagrant For DevOps
PPTX
Package Management on Windows with Chocolatey
PDF
Continuous Integration with Hackintosh
PDF
Servlets made easy. 
Write once and run everywhere.
Introduction to ansible
Varying wordpressdevelopmentenvironment wp-campus2016
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
Dev objective2015 lets git together
Production ready word press
Automated ui-testing
Realtime with websockets
CollabSphere 2018 - Java in Domino After XPages
Intro 2 docker
Introduction to docker
Building an iOS Build Server
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
Instant ColdFusion with Vagrant
Productivity 101: Making a Easily Re-deployable Dev Environment with Subversion
Docker and Puppet for Continuous Integration
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
Vagrant For DevOps
Package Management on Windows with Chocolatey
Continuous Integration with Hackintosh
Servlets made easy. 
Write once and run everywhere.
Ad

Similar to Varying WordPress Development Environment WordCamp Cincinnati 2016 (20)

PDF
Local development with vvv jon trujillo
PPTX
WordPress Development with VVV, VV, and Vagrant
PDF
Vagrant for local and team WordPress Development
PDF
Easy WP Dev environments with VVV
PDF
Keep calm and vagrant up
PDF
Vagrant for Virtualized Development
PDF
Powering Development and Testing Environments with Vagrant
ODP
It Works On My Machine: Vagrant for Software Development
PDF
Local development environment through virtualisation
PPTX
Varying vagrant vagrants
PPTX
Development with Vagrant
PDF
Vagrant workshop 2015
PPTX
Vagrant-Overview
PDF
Improved development workflows using vagrant
PPTX
WordPress Local Environments VVV
PDF
Vagrant are you still develop in a non-virtual environment-
PDF
Jakarta WordPress Meetup #9: Introducing VVV 2
PDF
WordPress & Vagrant
PDF
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
PDF
Take Home Your Very Own Free Vagrant CFML Dev Environment
Local development with vvv jon trujillo
WordPress Development with VVV, VV, and Vagrant
Vagrant for local and team WordPress Development
Easy WP Dev environments with VVV
Keep calm and vagrant up
Vagrant for Virtualized Development
Powering Development and Testing Environments with Vagrant
It Works On My Machine: Vagrant for Software Development
Local development environment through virtualisation
Varying vagrant vagrants
Development with Vagrant
Vagrant workshop 2015
Vagrant-Overview
Improved development workflows using vagrant
WordPress Local Environments VVV
Vagrant are you still develop in a non-virtual environment-
Jakarta WordPress Meetup #9: Introducing VVV 2
WordPress & Vagrant
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take Home Your Very Own Free Vagrant CFML Dev Environment
Ad

Recently uploaded (20)

PPTX
Cyber Hygine IN organizations in MSME or
DOC
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PPTX
Introduction to cybersecurity and digital nettiquette
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPT
12 Things That Make People Trust a Website Instantly
PPTX
E -tech empowerment technologies PowerPoint
PPTX
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
PPTX
newyork.pptxirantrafgshenepalchinachinane
PPTX
Reading as a good Form of Recreation
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PDF
Understand the Gitlab_presentation_task.pdf
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PDF
Containerization lab dddddddddddddddmanual.pdf
PDF
simpleintnettestmetiaerl for the simple testint
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
PPTX
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
PPT
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
Cyber Hygine IN organizations in MSME or
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
Power Point - Lesson 3_2.pptx grad school presentation
Introduction to cybersecurity and digital nettiquette
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
12 Things That Make People Trust a Website Instantly
E -tech empowerment technologies PowerPoint
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
newyork.pptxirantrafgshenepalchinachinane
Reading as a good Form of Recreation
Alethe Consulting Corporate Profile and Solution Aproach
Understand the Gitlab_presentation_task.pdf
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Containerization lab dddddddddddddddmanual.pdf
simpleintnettestmetiaerl for the simple testint
Mathew Digital SEO Checklist Guidlines 2025
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf

Varying WordPress Development Environment WordCamp Cincinnati 2016

  • 1. Varying WordPress Development Environment WordCamp Cincinnati 2016 #wccincy | #wcvwdeve David Brattoli Principal Infinite Reality, LLC
  • 2. Follow Along • Want to follow along during the presentation. Get the slides at: http://bit.ly/2dGfgxS
  • 3. About Me • Web Developer for 7+ years. Including 2+ years of WordPress experience • Owner of Infinite Reality LLC, a web web and graphic design firm, since since 2007 and have been working in working in higher educationfor the the last three years. • Recently began teaching a Web Design 2 class at Lorain County Community College (Elyria, OH) with with an emphasis on WordPress • Built 6+ WordPress themes with theme specific plugins • Migrated and designed 6+ complete sites with Wordpress
  • 4. Topics • Why use WordPress Local Development Environments • Available WordPress Development Environments • What is Varying Vagrant Vagrants ( VVV ) ? • Why use Varying Vagrant Vagrants ( VVV ) ? • Setting up a VVV local development environment • Code Demo • Styling the VVV development dashboard • Taking development environment to the new level with VV • Code Demo • Questions
  • 5. Why use WordPress Local Development Environments • Faster. No waiting for files to upload via FTP or SSH before you can refresh your browser and see your changes. • Easier debugging. Because everything is running on your system, setting up and using xDebug or other debugging tools is quite a bit easier. • Don’t need an internet connection work on things. • When working locally, you’re free to experiment and play around, as your work is not affecting current users. • Allows you to get experience with working with a server • Get to experience WordPress without having to commit to buying hosting
  • 6. Available Local WordPress Development Environments • Localhost • MAMP ( Mac )/WAMP (Windows ) • XAMPP • WordPress.comVIP • DesktopServer (Windows & Mac ) • ServerPress • Docker • Vagrant/VVV
  • 7. What is Varying Vagrant Vagrants ( VVV ) ? • Vagrant is a toolkit that runs on top ofVirtualBox, VMWare, or another virtual machine provider on your local machine.Vagrant will allow you to work with these virtual machines to run your code, while you keep your entire workflow on your local computer. • VaryingVagrantVagrants is aVagrant setup that provides a great start for localWordPress development. Whether you’re building plugins, themes, or full site, a localVVV installation is the best place to do your development.
  • 8. Why use Varying Vagrant Vagrants ( VVV ) ? • Works on both Mac andWindows • Customizable • Easy on your computer’s RAM • Easy site creation withVVV pluginVV • It is what theTheme Review and other majorWordPress contribut0rs use • No internet required to run except initial boot up • Self-contained portable environment
  • 9. Programs Needed • Command Line Tool : Terminal ( Mac ) or Command Prompt ( Windows ) or Git / GitBash ( Windows ) https://git-scm.com/downloads • Virtualbox (you can substitute Vmware, but I find Virtualbox easy to use and it’s free) https://www.virtualbox.org/wiki/Downloads • Vagrant https://www.vagrantup.com/ • Git https://git-scm.com/downloads • Windows user will need to install RubyInstaller package http://rubyinstaller.org/ • Node.js https://nodejs.org/en/
  • 10. Setting up a VVV local development environment • Go to https://www.vagrantup.com/downloads.html • Download Vagrant for your operating systems • Install Vagrant Step 1: Install Vagrant: • Go to https://www.virtualbox.org/wiki/Downloads • Download VirtualBox, for your operating systems, and download VirtualBox Guest Additions, for version of downloaded VirtualBox • Install VirtualBox and VirtualBox Guest Additions Step 2: Install VirtualBox and Guest Additions:
  • 11. Setting up a VVV local development environment • Open your command line tool ( For Windows 8 and above users run the tool as a Administrator ) • Install the vagrant-hostsupdater plugin. In your command line enter the following command: “vagrant plugin install vagrant-hostsupdater” and hit enter • Vagrant-hostsupdater adds an entry to your /etc/hosts file on the host system. • OnVagrants Launch commands , it tries to add the information, if it does not already exist in your hosts file. If it needs to be added, you will be asked for an administrator password, since it uses sudo ( Mac) / run as administrator ( windows ) to edit the file. Step 2:Vagrant Plugins:
  • 12. Setting up a VVV local development environment • Install the vagrant-triggers plugin. In your command line enter the following command: “vagrant plugin install vagrant-triggers” and hit enter • Vagrant-triggers allows the definition of arbitrary scripts that will run on the host or guest before and/or afterVagrant commands. • Default trigger is automated back-up of all SQL databases when Vagrant is shutdown. Other examples “Blacklisting commands, Skipping execution, andTrigger block DSL “ Step 2:Vagrant Plugins ( cont.. ):
  • 13. Setting up a VVV local development environment • Install the vagrant-vbguest plugin. In your command line enter the following command: “vagrant plugin install vagrant-vbguest” and hit enter • Vagrant-vbguest keeps theVirtualBox Guest Additions kernel modules of your guest synchronized with the version of your host whenever you do vagrant up. This can prevent some subtle shared folder errors. Step 2:Vagrant Plugins ( cont.. ):
  • 14. Setting up a VVV local development environment • There are two different methods for downloadingVVV. 1. Download theVVV using Git via command line 2. Downloading directly fromVVV Github page https://github.com/Varying-Vagrant-Vagrants/VVV Step 3: Downloading VVV:
  • 15. Setting up a VVV local development environment • First things first you need to take a closer look at the VVV git command git clone git://github.com/Varying-Vagrant-Vagrants/VVV.git vagrant-local • First is “git clone” . This is Git command that will retrieve the GitHub repository ad download a clone into the directory you are in when the command is initiated. • Second is “git://github.com/Varying-Vagrant-Vagrants/VVV.git”. This is the git url of the GitHub repository of VVV • Lastly is “vagrant-local”. This is the name of the folder in which the VVV files will be placed in. This is also important that the name of the folder will become the name of the VVV environment once it is created. So make to use a name that is easy to remember and will suit your dev needs. Step 3: Downloading VVV using Git:
  • 16. Setting up a VVV local development environment • Open a Terminal Window • Using the command line navigate to the location on your computer in which you want VVV installed using the cd command • Enter the following command: git clone git://github.com/Varying- Vagrant-Vagrants/VVV.git vagrant- local and hit Enter • If Git is not already installed you will be prompted by Terminal to install Git • Once installed VVV will be downloaded • Download Git via https://git-scm.com/downloads • Install Git • Open GitBash • Using the command line navigate to the location on your computer in which you want VVV installed using the cd command • Enter the following command git clone git://github.com/Varying-Vagrant- Vagrants/VVV.git vagrant-local and hit Enter MacWindows Step 3: DownloadingVVV using Git:
  • 17. Setting up a VVV local development environment • Using a internet browser navigate to https://github.com/Varying-Vagrant-Vagrants/VVV • Clink on the button labeled Clone or download • Select download • Once the file is downloaded, Unzip the file and Copy/Paste it’s contents into the location in which you want to store your VVV Dev environment files • As with the Git command the name of the folder is important do to the name of the folder will become the name of the VVV environment once it is created. So make to use a name that is easy to remember and will suit your dev needs. Step 3: Downloading VVV directly from GitHub:
  • 18. Setting up a VVV local development environment • Using your command line program navigate, using the cd command, to the folder in which you stored the VVV files • (Optional) At this time you can open VirtualBox if wish to see the box entry being created • Enter the following command ” vagrant up “ and hit enter • Depending on your computer and your internet speed the installation can take upwards of 5-10 minutes. • Congratulations you now have you own Vagrant VVV Development Environment Step 4: Start the Vagrant environment :
  • 19. Setting up a VVV local development environment • Now using your browser go to vvv.dev to see the dashboard of your new VVV environment • By default the Vagrant installation comes with four default WordPress installs • local.wordpress.dev for WordPress stable • local.wordpress-trunk.dev for WordPress trunk • src.wordpress-develop.dev for trunk WordPress development files • build.wordpress-develop.dev for the version of those development files built with Grunt
  • 20. VVV Initial Vagrant Up Video Because the initial installation can take a lengthy amount of time based on internet speed, here is a link to my first vagrant up server so you see and compare to your installation. Video can be found at https://www.youtube.com/watch?v=12HM6in1kOQ
  • 21. Demo
  • 22. Styling the VVV development dashboard • The initial VVV dashboard located at VVV.dev is very basic and has no styling • To correct this we will have to download custom dashboard files. To see available options go to https://github.com/Varying-Vagrant-Vagrants/VVV and look at the section titled Custom Dashboards • The dashboard I will be demo is by leogopal and is located at https://github.com/leogopal/VVV-Dashboard • As with the VVV download click the download link to download the dashboard files • Once downloaded Unzip and Copy the file dashboard- custom.php and the folder titled dashboard • Using Finder (Mac) / Explorer ( Windows ) navigate to “name of your vagrant/www/default/” and then paste • Now using your browser navigate to vvv.dev and when the page loads you will see the new updated dashboard
  • 23. Taking development environment to the next level with VV • By default the Vagrant installation comes with four default WordPress installs. • To create a new install you must first install VV - aVVV Site Creation Wizard by Bradp located at: https://github.com/bradp/vv
  • 24. Taking development environment to the next level with VV • Clone vv to a folder somewhere. • $ git clone https://github.com/bradp/vv.git • Add that folder to your system path. See here if you need help. • Open an explorer window and go to My Computer (orThis PC). • Right click and choose properties • Choose Advanced System Settings • Choose EnvironmentalVariables form the AdvancedTab • Choose the "Path" variable and edit it. • Add a semicolon to end the previous path item and then add the vv folder path (Example:;C:UsersNameDocumentsvv) • Open Git Bash and run vv * Alternately, you can use command prompt and use the bash vv command. * InstallingVV onWindows
  • 25. Taking development environment to the next level with VV • Open Terminal • Install HomeBrew Go to http://brew.sh/ and copy the installation command. It looks like this: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" • Paste the command into terminal and hit Enter • Once homebrew is installed enter the following command into terminal brew install bradp/vv/vv And hit Enter InstallingVV on Mac
  • 26. Taking development environment to the next level with VV • Open your command line tool: Terminal ( Mac) / GitBash or Command Prompt (Windows) • In you command enter the following command” vv create • You will then be prompted to enter the path to the location to the directory of yourVVV installation • Once completed a theVV site wizard will ask you a series of prompts to create your new installation • The prompts are as follows • Name of new site directory: This is the name of the installation you wish to create. It will also be the name of the folder in which the site will be created UsingVV
  • 27. Taking development environment to the next level with VV • Domain to use (leave blank for nameofsitedirecoty.dev): This will be the URL you will use to access the site. If you leave it blank the system will automatically use the site directory name as the URL • WordPress version to install (leave blank for latest version or trunk for trunk/nightly version): This is were specify what version you wish to use in the new site. If left blank it will grab the most recent WordPress release • Install as multisite? : The wizard has the ability to create the site a multisite. If you answer yes to this question you then be prompted to either choose to install a subdomain or subdirectory multisite installation. • Git repo to clone as wp-content (leave blank to skip): If you have a GitHub repository you wish to attach to the site you can enter it here. If don’t have one you can leave it blank UsingVV ( cont. )
  • 28. Taking development environment to the next level with VV • Local SQL file to import for database (leave blank to skip): This prompt will allow you to either import a SQL database file to be used to populate the new site or if left blank the wizard will create a blank SQL file that will be populated by the WordPress install • Remove default themes and plugins? : This prompt wants to know if you wish to remove the defaultWordPress default themes ( Twentyfifteen orTwentysixteen) andWordPress default plugin Aksimet . • Add sample content to site (y/N): This will allow you to populate the WordPress install sample content to test yourWordPress themes and plugins.The content used is the same used by the WordPressTheme Review teams. • EnableWP_DEBUG and WP_DEBUG_LOG (y/N): This will allow you to either turn on or leave off the WordPress debug mode. • You will then be shown a summary of your choices and will be prompted to continue with the installation or not. Once you answer yes the wizard will begin to install the newVVV site. UsingVV ( cont. )
  • 29. VV/VVV Commands • Vagrant Up: Turns theVagrant InstallOn • Vagrant Halt: Turns theVagrant Install OFF • vv create: creates a new site • vv list: displays a list of all available sites in yourVVV install • vv delete site_name: Site deletion For more information please check out https://github.com/bradp/vv https://github.com/Varying-Vagrant-Vagrants/VVV
  • 30. Before you shut down your computer • Before shutdown you HAVE to shut down your vvv or vagrant box by running: vagrant halt
  • 32. David Brattoli Web: www.Infiniterealityllc.com www.Dabrattoli.com Twitter: @DavidMBrattoli Email: davidbrattoli@yahoo.com david.brattoli@infiniterealityllc.com Github: https://github.com/dabrattoli Contact Information
  • 33. Slides SlidesCan be found at http://www.slideshare.net/DavidBrattoli/varying- wordpressdevelopmentenvironment-wccincy2016 OR http://bit.ly/2dGfgxS
  • 34. Want More? • Stay tuned by following me onTwitter and my blog at www.dabrattoli.com because I will be posting step by step how to articles on everything I talked about today for both Mac andWindows along otherWordPress development topics.
  • 35. Bonus Links • Instructions to turn on code debugging such xDebug for yourVVV box can found here: https://github.com/Varying-Vagrant- Vagrants/VVV/wiki/Code-Debugging • Guide for SASS http://sass-lang.com/guide • GitHub For Beginners: Don’t Get Scared, Get Started http://readwrite.com/2013/09/30/understanding-github-a- journey-for-beginners-part-1/
  • 36. Bonus Links • How to Use Git forWordPress Development – https://premium.wpmudev.org/blog/git-for-wordpress- development/ • WP Pusher- https://wppusher.com/ • The Ultimate GuideTo Automatic Updates WithWP Pusher – http://blog.wppusher.com/the-ultimate-guide-to- automatic-updates-with-wp-pusher/
  • 37. Resources Mentioned  https://git-scm.com/downloads  https://www.vagrantup.com/  https://git-scm.com/downloads  https://www.vagrantup.com/downloads.html  https://www.virtualbox.org/wiki/Downloads  https://git-scm.com/downloads  https://github.com/Varying-Vagrant-Vagrants/VVV  https://github.com/leogopal/VVV-Dashboard  https://github.com/bradp/vv  http://brew.sh/