SlideShare a Scribd company logo
1 of 20
Developing WordPress Locally
with Vagrant
Jason Yingling
@jason_yingling
Why Should You Develop Locally?
• Gives you the opportunity to test first
• Quickly setup sites for testing
• Avoid this:
MAMP
• Pros
– Free
– Easy setup
• Cons
– No custom domains
– Single server
– Not great for multiple installs
MAMP Pro
• Pros
– Multiple sites
– Custom domains
– Multiple versions of PHP
– GUI Interface
• Cons
– Not free
Vagrant
• Pros
– Custom domains
– Multiple sites
– Free
– Anything is possible!
• Cons
– No gui (by default)
– Command line seems intimidating
What We’ll Need to Setup
• Virtual Box
• Vagrant
• Varying Vagrant Vagrants
• Variable VVV
What We’ll Need to Do to Setup Local
WordPress Sites When Done
• Open terminal
• Type “vv create”
• Answer a few prompts
• Grab a beer and wait
Install VirtualBox
• https://www.virtualbox.org/wiki/Downloads
• Download the most recent version
• Install like any other application
Install Vagrant
• https://www.vagrantup.com/downloads.html
• Download the most recent version
• Install like any other application
Setup Varying Vagrant Vagrants
• Open up Terminal
• Run “vagrant plugin install vagrant-
hostsupdater”
• Run “vagrant plugin install vagrant-triggers”
• Navigate to a directory to use for your vagrant
directory: “cd ~/sites”
• Clone the VVV repo: “git clone
git://github.com/Varying-Vagrant-
Vagrants/VVV.git vagrant-local”
Variable VVV
• Let’s you create new WordPress installs by
answering a few prompts
Install Variable VVV
• Don’t have Homebrew. Install it with ruby -e
"$(curl -fsSL
https://raw.githubusercontent.com/Homebr
ew/install/master/install)”
• Run “brew install bradp/vv/vv”
• Run “vv create” any time you want to make a
new dev site
• Set your path
– /Users/{ComputerUserName}/sites/vagrant-local
Vagrant Manager
Vagrant Manager Installation
• https://github.com/lanayotech/vagrant-
manager/releases/tag/2.3.0
Vagrant Dashboard
Install Vagrant Dashboard
• Navigate to your vagrant-local folder: cd
~/sites/vagrant-local/www
• Run: git clone
https://github.com/topdown/VVV-
Dashboard.git dashboard
• From the Dashboard folder:
– Copy the dashboard-custom.php to vagrant-
local/www/default/dashboard-custom.php
– Copy the style.css to vagrant-
local/www/default/style.css
• Check out your Fancy new dashboard at vvv.dev
VVV Provision Flipper
• Speed up the provisioning process
• Download from Github: https://github.com/bradp/vvv-
provision-flipper
• Run: echo $PATH
• Copy flip file into one of the paths from the previous step
• Run: flip
• Set path to your vagrant-local folder:
/Users/{ComputerUserName}/sites/vagrant-local
• Select your provision script with “flip set {scripte_name}”
ex: flip set quick
• Reset to the original provision script with “flip reset”
Blueprints
• Allows you to set specific plugins, themes,
content, and more to be installed when a new
site is created
• Run: vv --blueprint-init to create vv-
blueprints.json file
• Sample:
https://github.com/bradp/vv#blueprints
Hooks
• Newer feature of Variable VV
• Similar to WP Hooks
• Let’s you hook into processes that run during
site creation and add your own code
Resources
• Detailed setup guide:
https://jasonyingling.me/setting-up-a-local-
wordpress-environment-with-vagrant/
• Varying Vagrant Vagrants -
https://github.com/Varying-Vagrant-
Vagrants/VVV#varying-vagrant-vagrants
• Variable VV -
https://github.com/bradp/vv#variable-vvv---
the-best-vvv-site-wizard

More Related Content

More from Jason Yingling

More from Jason Yingling (9)

Battling Google PageSpeed Insights
Battling Google PageSpeed InsightsBattling Google PageSpeed Insights
Battling Google PageSpeed Insights
 
Putting the Develop in Development
Putting the Develop in Development Putting the Develop in Development
Putting the Develop in Development
 
Getting to Know Underscores
Getting to Know Underscores Getting to Know Underscores
Getting to Know Underscores
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sites
 
Creating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPressCreating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPress
 
WordPress Template hierarchy
WordPress Template hierarchyWordPress Template hierarchy
WordPress Template hierarchy
 
Design todevelop
Design todevelopDesign todevelop
Design todevelop
 
Ithemes presentation
Ithemes presentationIthemes presentation
Ithemes presentation
 
Building Flexible Sites with Advanced Custom Fields
Building Flexible Sites with Advanced Custom FieldsBuilding Flexible Sites with Advanced Custom Fields
Building Flexible Sites with Advanced Custom Fields
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
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...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 

Developing WordPress Locally with Vagrant

  • 1. Developing WordPress Locally with Vagrant Jason Yingling @jason_yingling
  • 2. Why Should You Develop Locally? • Gives you the opportunity to test first • Quickly setup sites for testing • Avoid this:
  • 3. MAMP • Pros – Free – Easy setup • Cons – No custom domains – Single server – Not great for multiple installs
  • 4. MAMP Pro • Pros – Multiple sites – Custom domains – Multiple versions of PHP – GUI Interface • Cons – Not free
  • 5. Vagrant • Pros – Custom domains – Multiple sites – Free – Anything is possible! • Cons – No gui (by default) – Command line seems intimidating
  • 6. What We’ll Need to Setup • Virtual Box • Vagrant • Varying Vagrant Vagrants • Variable VVV
  • 7. What We’ll Need to Do to Setup Local WordPress Sites When Done • Open terminal • Type “vv create” • Answer a few prompts • Grab a beer and wait
  • 8. Install VirtualBox • https://www.virtualbox.org/wiki/Downloads • Download the most recent version • Install like any other application
  • 9. Install Vagrant • https://www.vagrantup.com/downloads.html • Download the most recent version • Install like any other application
  • 10. Setup Varying Vagrant Vagrants • Open up Terminal • Run “vagrant plugin install vagrant- hostsupdater” • Run “vagrant plugin install vagrant-triggers” • Navigate to a directory to use for your vagrant directory: “cd ~/sites” • Clone the VVV repo: “git clone git://github.com/Varying-Vagrant- Vagrants/VVV.git vagrant-local”
  • 11. Variable VVV • Let’s you create new WordPress installs by answering a few prompts
  • 12. Install Variable VVV • Don’t have Homebrew. Install it with ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebr ew/install/master/install)” • Run “brew install bradp/vv/vv” • Run “vv create” any time you want to make a new dev site • Set your path – /Users/{ComputerUserName}/sites/vagrant-local
  • 14. Vagrant Manager Installation • https://github.com/lanayotech/vagrant- manager/releases/tag/2.3.0
  • 16. Install Vagrant Dashboard • Navigate to your vagrant-local folder: cd ~/sites/vagrant-local/www • Run: git clone https://github.com/topdown/VVV- Dashboard.git dashboard • From the Dashboard folder: – Copy the dashboard-custom.php to vagrant- local/www/default/dashboard-custom.php – Copy the style.css to vagrant- local/www/default/style.css • Check out your Fancy new dashboard at vvv.dev
  • 17. VVV Provision Flipper • Speed up the provisioning process • Download from Github: https://github.com/bradp/vvv- provision-flipper • Run: echo $PATH • Copy flip file into one of the paths from the previous step • Run: flip • Set path to your vagrant-local folder: /Users/{ComputerUserName}/sites/vagrant-local • Select your provision script with “flip set {scripte_name}” ex: flip set quick • Reset to the original provision script with “flip reset”
  • 18. Blueprints • Allows you to set specific plugins, themes, content, and more to be installed when a new site is created • Run: vv --blueprint-init to create vv- blueprints.json file • Sample: https://github.com/bradp/vv#blueprints
  • 19. Hooks • Newer feature of Variable VV • Similar to WP Hooks • Let’s you hook into processes that run during site creation and add your own code
  • 20. Resources • Detailed setup guide: https://jasonyingling.me/setting-up-a-local- wordpress-environment-with-vagrant/ • Varying Vagrant Vagrants - https://github.com/Varying-Vagrant- Vagrants/VVV#varying-vagrant-vagrants • Variable VV - https://github.com/bradp/vv#variable-vvv--- the-best-vvv-site-wizard