SlideShare une entreprise Scribd logo
1  sur  10
Working with Vagrant in my 
WordPress development 
workflow 
James Bundey @jamesbundey 
Melbourne WordPress Developer Meetup November ‘14
What is Vagrant? 
Create and configure lightweight, reproducible, and 
portable development environments 
https://www.vagrantup.com
Why bother? 
• Simple to set-up 
• Enables you to easily recreate local development 
configurations 
• Enables easy and total management of each 
environments 
• Keeps development clean - run one set-up for 
WordPress projects another for another CMS 
• Take advantage of the open source configurations 
created by people far smarter than me.
Getting started 
1. Install Virtual Box - We need this to create the virtual machines 
that are going to house our development environments - 
https://www.virtualbox.org/wiki/Downloads 
2. Install Vagrant - https://www.vagrantup.com/downloads.html 
3. Install two extremely useful plugins via the command line 
• Vagrant Hostsupdater - enables you to access your 
development server via a web browser without additional 
configuration 
$ vagrant plugin install vagrant-hostsupdater 
• Vagrant Triggers - backs up and restores the database after 
every shutdown and boot up. 
$ vagrant plugin install vagrant-triggers
Vagrant & WordPress configuration 
• Once Vagrant is set-up we need to create a configuration file to set-up 
the development environment 
• Thankfully there’s lots already out there - here’s a great overview of some 
http://wptavern.com/13-vagrant-resources-for-wordpress-development 
• I’m using Varying Vagrant Vagrants - https://github.com/Varying-Vagrant- 
Vagrants/VVV 
• To set-up our WordPress environment, we simply git clone VVV to a 
folder and run 
cd ~/new-folder 
vagrant up 
• Sit back and grab a cup of tea (I am british after all) while it works its 
magic
Vagrant & WordPress 
• Once completed you’ll have four WordPress site 
configurations installed in the www folder 
• WordPress Stable: local.wordpress.dev (typically what I’m going to use) 
• WordPress Trunk:local.wordpress-trunk.dev 
• WordPress Develop: src.wordpress-develop.dev & build.wordpress-develop.dev 
• You can now access & freely develop as required - 
http://local.wordpress.dev 
• To access phpMyAdmin - http://vvv.dev/database-admin/
Some useful extensions 
• VVV Site Wizard - saves time by enabling you to easily 
create additional WordPress installs. The wizard guides 
you through the set-up & creates the database, host 
names etc - https://github.com/aliso/vvv-site-wizard 
• VVV Dashboard - creates a dashboard that can be 
viewed in the browser, that enables you to easily view 
and manage all your installs 
• Vagant Manager - OSX app for managing Vagrant 
installs - http://www.vagrantmanager.com
Integrating with my workflow 
1. Using the VVV wizard I create a new install on the same 
server - standard install 
2. I store the plugins that I use 99.9% of the time in all 
projects in a Git repository, which I clone to the wp-content 
folder 
3. I clone my framework, to the themes folder as my base 
4. I then remove the .git file as I will be creating a new repo 
to host this theme 
5. I install my Bower & Grunt dependencies and start 
developing
Any problems 
• So far none. I’ve found it extremely useful to set-up and 
much quicker than Mamp Pro 
• Highly recommend the app, as it makes things easy 
• Keeping each environment separate has been a bonus 
and for those using other CMS there are very similar 
configuration files. 
• Experimented with sharing the environment across 
multiple machines using Dropbox and sym links, with 
mixed success.
Questions? 
Connect with me 
@jamesbundey 
www.linkedin.com/in/jamesbundey

Contenu connexe

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Introduction to Vagrant & using it for WordPress development

  • 1. Working with Vagrant in my WordPress development workflow James Bundey @jamesbundey Melbourne WordPress Developer Meetup November ‘14
  • 2. What is Vagrant? Create and configure lightweight, reproducible, and portable development environments https://www.vagrantup.com
  • 3. Why bother? • Simple to set-up • Enables you to easily recreate local development configurations • Enables easy and total management of each environments • Keeps development clean - run one set-up for WordPress projects another for another CMS • Take advantage of the open source configurations created by people far smarter than me.
  • 4. Getting started 1. Install Virtual Box - We need this to create the virtual machines that are going to house our development environments - https://www.virtualbox.org/wiki/Downloads 2. Install Vagrant - https://www.vagrantup.com/downloads.html 3. Install two extremely useful plugins via the command line • Vagrant Hostsupdater - enables you to access your development server via a web browser without additional configuration $ vagrant plugin install vagrant-hostsupdater • Vagrant Triggers - backs up and restores the database after every shutdown and boot up. $ vagrant plugin install vagrant-triggers
  • 5. Vagrant & WordPress configuration • Once Vagrant is set-up we need to create a configuration file to set-up the development environment • Thankfully there’s lots already out there - here’s a great overview of some http://wptavern.com/13-vagrant-resources-for-wordpress-development • I’m using Varying Vagrant Vagrants - https://github.com/Varying-Vagrant- Vagrants/VVV • To set-up our WordPress environment, we simply git clone VVV to a folder and run cd ~/new-folder vagrant up • Sit back and grab a cup of tea (I am british after all) while it works its magic
  • 6. Vagrant & WordPress • Once completed you’ll have four WordPress site configurations installed in the www folder • WordPress Stable: local.wordpress.dev (typically what I’m going to use) • WordPress Trunk:local.wordpress-trunk.dev • WordPress Develop: src.wordpress-develop.dev & build.wordpress-develop.dev • You can now access & freely develop as required - http://local.wordpress.dev • To access phpMyAdmin - http://vvv.dev/database-admin/
  • 7. Some useful extensions • VVV Site Wizard - saves time by enabling you to easily create additional WordPress installs. The wizard guides you through the set-up & creates the database, host names etc - https://github.com/aliso/vvv-site-wizard • VVV Dashboard - creates a dashboard that can be viewed in the browser, that enables you to easily view and manage all your installs • Vagant Manager - OSX app for managing Vagrant installs - http://www.vagrantmanager.com
  • 8. Integrating with my workflow 1. Using the VVV wizard I create a new install on the same server - standard install 2. I store the plugins that I use 99.9% of the time in all projects in a Git repository, which I clone to the wp-content folder 3. I clone my framework, to the themes folder as my base 4. I then remove the .git file as I will be creating a new repo to host this theme 5. I install my Bower & Grunt dependencies and start developing
  • 9. Any problems • So far none. I’ve found it extremely useful to set-up and much quicker than Mamp Pro • Highly recommend the app, as it makes things easy • Keeping each environment separate has been a bonus and for those using other CMS there are very similar configuration files. • Experimented with sharing the environment across multiple machines using Dropbox and sym links, with mixed success.
  • 10. Questions? Connect with me @jamesbundey www.linkedin.com/in/jamesbundey