Upload
matt-banks
View
2.701
Download
0
Tags:
Embed Size (px)
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.
Citation preview
Developing Locally with WordPress: No More
Cowboy Coding!
Matt Banks !
@mattbanks
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
Don’t be a Cowboy Coder
Running a Local Server
• MAMP / XAMMP / WAMP
• DestopServer
• Native LAMP Stack
• Vagrant
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
DesktopServer
• Free and Paid versions available
• LAMP stack + WordPress installed
• http://serverpress.com/products/desktopserver/
Installing MAMP
• Download and run Installer
• Open app, visit http://localhost:8888/
• Party!
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/
Vagrant
• The ultimate local development environment
• Manage virtual machines
• http://www.vagrantup.com/
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
Installing Vagrant
• Download/install VirtualBox https://www.virtualbox.org/
• Download/install Vagrant http://www.vagrantup.com/
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
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
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)
Now What?Install WordPress,
of course!
http://codex.wordpress.org/Installing_WordPress
http://codex.wordpress.org/
Installing_WordPress_Locally_on_Your_Mac_With_MAMP
Demo
Thank You!If you have any questions, let me know!
!Twitter: @mattbanks
!Skype: mattbanks-14