Local Development John Dorner @jdorner
Local DevelopmentJohn Dorner
@jdorner
What is a Local Development Environment?A web server on your computer.A LAMP stack (Linux, Apache, MySql and PHP)
http://developer.wordpress.org/themes/getting-started/setting-up-a-development-environment
Integrated Development EnvironmentSource code editorBuild automation tools DebuggerIntelligent code
completion Version ControlDebugging
Visual StudioEclipseVimNetBeansXcodeSublime TextKomodoEmacsPhpStorm
Why do you need to develop locally?Test changes before you push them to the
live serverHave a copy or versions of your website stored on
your computerWork offlinePLAY
What are your options?XAMPP MAMP
Free for 1; $59 for unlimitedDesktopServer (serverpress.com)
Free for < 4; $99.95 for unlimitedWAMP
Windows only
What are your options?Vagrant
Varying Vagrant Vagrants (VVV)Trellis (https://roots.io/trellis/)
PuPHPet https://puphpet.com/ Manually install apache, php, MySql… Others...
Which should you choose?ServerPress
Easiest
Automatically installs WP
$99.95 for more than 3
MAMPEasy to install
Best GUI
$59 for more than 1
XAMPPEasy to install
Learning
FREE
Vagrant and VVVEasy on Mac
Not as easy on Windows
Multiple environments
Best for developers
Trellis ???
Windows IIS is running
Mac Version
Mac structure is a little different
Configuring Virtual HostsC:\XAMPP\apache\conf\httpd.conf/Applications/XAMPP/etc/httpd.confUse Notepad++, TextWrangler or any other text editorRemove # sign
Configuring Virtual HostsWindows:
C:\xampp\apache\conf\extra\httpd-vhosts.conf
Mac:
/Applications/XAMPP/etc/extra/httpd-vhosts.conf
<VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/" ServerName localhost</VirtualHost><VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/wcavl" ServerName wcavl.local</VirtualHost>
<VirtualHost *:80> DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/" ServerName localhost</VirtualHost><VirtualHost *:80> DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/wcavl" ServerName wcavl.local</VirtualHost>
MAMP ConfigurationTo create virtual hosts in MAMP:
Edit C:\MAMP\conf\apache\httpd.confRemove comment before "Include conf/extra/httpd-vhosts.conf"
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf
Which should you choose?ServerPress
Easiest
Automatically installs WP
$99.95 for more than 3
MAMPEasy to install
Best GUI
$59 for more than 1
XAMPPEasy to install
Learning
FREE
Vagrant and VVVEasy on Mac
Not as easy on Windows
Multiple environments
Best for developers
Trellis ???
VagrantCreate and configure lightweight, reproducible, and
portable development environments.
Installing VagrantFollow instructions at: https://github.com/Varying-Vagrant-Vagrants/VVV
When running step 6, install Xcode
https://www.virtualbox.org/wiki/Downloads
Windows 10 issuesYou may have to remove antivirus program.
Avira and probably Kapersky
You may have to download and install Githttps://git-scm.com/
Download Virtual Boxhttps://www.virtualbox.org/wiki/Downloads
Should install GITOn Windows… before step 6
From git bash or use git GUI