developing locally with wordpress: no more cowboy coding
DESCRIPTION
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.TRANSCRIPT
![Page 1: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/1.jpg)
Developing Locally with WordPress: No More
Cowboy Coding!
Matt Banks !
@mattbanks
![Page 2: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/2.jpg)
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
![Page 3: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/3.jpg)
Don’t be a Cowboy Coder
![Page 4: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/4.jpg)
Running a Local Server
• MAMP / XAMMP / WAMP
• DestopServer
• Native LAMP Stack
• Vagrant
![Page 5: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/5.jpg)
MAMP / XAMMP / WAMP
• Self-contained applications to run local servers
• MAMP - http://www.mamp.info/ - Mac
• XAMMP - http://www.apachefriends.org/en/xampp.html - Mac/Windows
• WAMP - http://www.wampserver.com/ - Windows
![Page 6: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/6.jpg)
DesktopServer
• Free and Paid versions available
• LAMP stack + WordPress installed
• http://serverpress.com/products/desktopserver/
![Page 7: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/7.jpg)
Installing MAMP
• Download and run Installer
• Open app, visit http://localhost:8888/
• Party!
![Page 8: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/8.jpg)
![Page 9: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/9.jpg)
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/configuring-a-lamp-stack-on-mac-os-10-8/
![Page 10: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/10.jpg)
Vagrant
• The ultimate local development environment
• Manage virtual machines
• http://www.vagrantup.com/
![Page 11: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/11.jpg)
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
![Page 12: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/12.jpg)
Installing Vagrant
• Download/install VirtualBox https://www.virtualbox.org/
• Download/install Vagrant http://www.vagrantup.com/
![Page 13: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/13.jpg)
Vagrant Boxes• Download pre-made boxes from
Vagrant or other usershttp://www.vagrantbox.es/
• Create your own Vagrant box
• PuPHPethttps://puphpet.com/
• Share it on GitHub!https://github.com/mattbanks/vagrant-dev-box
![Page 14: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/14.jpg)
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-vagrant-vagrants
![Page 15: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/15.jpg)
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)
![Page 16: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/16.jpg)
Now What?Install WordPress,
of course!
http://codex.wordpress.org/Installing_WordPress
http://codex.wordpress.org/
Installing_WordPress_Locally_on_Your_Mac_With_MAMP
![Page 17: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/17.jpg)
Demo
![Page 18: Developing Locally with WordPress: No More Cowboy Coding](https://reader033.vdocument.in/reader033/viewer/2022060109/5554ebd4b4c90566278b4c9b/html5/thumbnails/18.jpg)
Thank You!If you have any questions, let me know!
!Twitter: @mattbanks
!Skype: mattbanks-14