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

Dernier (20)

How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 

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