Discussing how to setup a local development environment for WordPress and why you want to develop and test locally. Find out how to fix problems like “it works on my machine” before they happen, and how to test updates and changes without cowboy coding and breaking your website.
2. Why Develop Locally?
•
Test new features and updates without breaking
your live/production site - no Cowboy Coding
•
Run Nightly/Beta builds of WordPress for testing
•
Contribute to Core!
•
Work offline, anywhere
9. Native LAMP Stack
•
More advanced, more customizable
•
Built in Apache/PHP in Mac + Homebrew
•
brew install mysql
Configure Apache, Hosts file, etc.
•
http://joshuakaiser.com/2012/08/29/configuringa-lamp-stack-on-mac-os-10-8/
11. Benefits of Vagrant
•
Mimic your production environment
•
No more “It worked for me in development”
•
Manage multiple virtual machines to mimic
multiple hosting environments
•
Compartmentalized and portable
13. Vagrant Boxes
Download pre-made boxes from
Vagrant or other users
•
http://www.vagrantbox.es/
•
Create your own Vagrant box
•
PuPHPet
https://puphpet.com/
Share it on GitHub!
•
https://github.com/mattbanks/
vagrant-dev-box
14. Varying Vagrant Vagrants
•
Terrific LEMP (Nginx) Vagrant box from 10up
•
Includes WordPress stable, trunk, src (trunk
development files), and build (dev files built with
Grunt)
https://github.com/10up/varying-vagrantvagrants
15. Booting a Vagrant Box
•
Go to your Vagrant box folder
in Terminal
•
Run “vagrant up”
•
Box will download and
provision (may take a few
minutes the first time)
16. Now What?
Install WordPress,
of course!
http://codex.wordpress.org/
Installing_WordPress
http://codex.wordpress.org/
Installing_WordPress_Locally
_on_Your_Mac_With_MAMP