1 of 18

WordPress and Web Dev Environment on Hyper-v

Robert Wilde

WordCamp SunShine Coast 2016

2 of 18

3 of 18

Some Quick Questions for you, please.

Who uses Windows as primary Dev environment?

How many people have used a Hypervisor, Virtualbox, VMware, Parallels ?

How many people have used Windows Hyper-V?

4 of 18

What I hardware I use for Dev on Windows

CPU - XEON E3-1230 V2 (comparable i7 4770k)

Mobo - Intel DZ77GA-70k

Mem - 32GB DDR3 1600Mhz

Data - Samsung 128GB Pro SSD� - Samsung 250GB EVO SSD� - 3 x 1TB Samsung HDD

Monitors - 27”, 22”, 24”, 24”

5 of 18

My Dev System

6 of 18

Must Have Essentials for Windows Dev

  • Must be Windows 10 Pro, Enterprise, Education
  • Must be compatible CPU i5 / i7 (VT-x only)

Flexible Recommendations

  • Memory 16GB ish
  • Storage to be SSD (250GB Samsung 750 $119)
  • Double NICs on board on PCIe card

7 of 18

Windows comes to the Party

Windows Action pack - IUR Software

  • Includes ten Windows 10 Enterprise (upgrade) licenses, three Visual Studio Professional licenses, and a no-cost Visual Studio Team Services account
  • Get up to ten Office 365 (E3) seats, plus five seats of Enterprise Mobility Suite and Microsoft Dynamics CRM Online Professional2
  • Receive US$100 of Microsoft Azure credits per month

$475 USD

$237.50!!!�Use code WELCOME2ACTIONPACK 50%�(*Limited time offer until June 30, 2016)

Also look at �https://partner.microsoft.com/en-AU/membership/action-packhttps://www.microsoft.com/bizspark

8 of 18

Setup Hyper-v

  1. Right click on the Windows button and select ‘Programs and Features’.
  2. Select Turn Windows Features on or off.
  3. Select Hyper-V and click OK.

Or

PowerShell

Open a PowerShell console as Administrator.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick_start/walkthrough_compatibility

9 of 18

Configure Hyper-V

Open Hyper-V manager

10 of 18

POST Ubuntu Install

Complete updates

Add your User to SUDO group

sudo su�gpasswd -a itadmin sudo�exit�sudo visudo�itadmin ALL=NOPASSWD: ALL

Update and Upgrade�Sudo SU�apt-get update�apt-get upgrade�apt-get dist-upgrade

11 of 18

Manage domains on Local Machines

Windows 10 users can simply install the module using the command below.�Install-Module PsHosts

https://github.com/richardszalay/pshosts

# List all entriesGet-HostEntry

# Add an entryAdd-HostEntry mysite.local 127.0.0.1

# Disable (comment out) entriesDisable-HostEntry mysite.local

12 of 18

Easy Engine by RTCamp

https://easyengine.io/

wget -qO ee rt.cx/ee && sudo bash ee # install easyengine�NGINX, PHP, PHP7, HHVM, MySQL, postfix, wpcli, redis,

sudo ee stack install --web

sudo ee stack install --admin installs Adminer, phpMyAdmin, phpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer.

sudo ee stack install --utilsphpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer.

Set WP username, password, email�sudo nano /etc/ee/ee/conf

13 of 18

Post EasyEngine install

Configure EasyEngine settings and BINDFS http://bindfs.org/

All commands completed under root# Installing bindfs (just the first time) �apt-get update �apt-get -y install bindfs ��# Creating the application mountpoint �mkdir -p /home/itadmin/www �chown -Rf itadmin:itadmin /home/itadmin/www �chmod -Rf 770 /home/itadmin/www

nano /etc/fstab

bindfs#/var/www /home/itadmin/www fuse force-user=itadmin,force-group=itadmin,create-for-user=www-data,create-for-group=www-data,create-with-perms=0770,chgrp-ignore,chown-ignore,chmod-ignore 0 0��mount /home/itadmin/www

14 of 18

Let's build a WordPress site in 1 line

sudo ee site create example.com --wp

Other Options # https://easyengine.io/docs/commands/site/create/

sudo ee site create example.com --html

sudo ee site create example.com --php

sudo ee site create example.com --mysql

WordPress Multisite

sudo ee site create example.com --wpsubdir # With Subdirectoy�sudo ee site create example.com --wpsubdom # With Subdomain

sudo ee site create example.com --wp --php7�sudo ee site create example.com --wp --hhvm

15 of 18

PHPStorm new Project

  • File -> New Project From existing Files
  • Select Web Server is on remote host, access via FTP/SFTP/FTPS
  • Project Name and File location / Select Custom Deployment Options
  • Add New Remote Server
  • Add the domain name create - will end up with three
  • add domain settings
  • Mark the Project Root File - Inside Root Path Selection
  • Next and You're Done

16 of 18

Other software I use for Developing

17 of 18

You now have a Virtual Dev system on Windows

Time for Questions?

18 of 18

Who am I?

First and Foremost I am a Dad!

Then I am just a super mega nerd!!

1995 - studying Electronic Engineering

1996 - Managing Custom Control Computers for Comalco Aluminium

1997 - Hospitality Sound & Lighting tech / DJ / MC

2003 - Technical/Lighting Director Family Nightclub Brisbane

2005 - PHP Developer

2007 - Microsoft Systems Administrator

2010 - SMB Hardware and Networking Consultant

2013 - Cloud Technology Consultant / WordPress Developer