no more “cowboy coding”

21
No more “Cowboy Coding” A Best Practices Guide to Local Development & Migration all disney images used without permission so don’t sue me

Upload: jim-true

Post on 09-Jan-2017

254 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: No more “cowboy coding”

No more “Cowboy Coding”

A Best Practices Guide to Local Development

& Migration

all disney images used without permission so don’t sue me

Page 2: No more “cowboy coding”

How many of you have done THIS?

Page 3: No more “cowboy coding”

Or This? (without a backup)

Page 4: No more “cowboy coding”

Or This?

Page 5: No more “cowboy coding”

Well, That’s Cowboy Coding!

And we don’ttake KINDLY to those kindaSHENANIGANS!

(and neither doyour clients)

Page 6: No more “cowboy coding”

Tonight, we’ll talk aboutthe Importance of:

✘Regular Backups(Even Better in the CLOUD!)

✘Local Development FIRST✘Understanding the WordPress Database

& File Structure✘Version Control Process

(& why it’s so important)✘Migrating a LIVE Website from Local

(without losing your head)

Page 7: No more “cowboy coding”

BACKUPSMINIMUM: Copy your file before editing or replacing into

a backup directoryBETTER: Use Cloud Connected Storage

✘OFFSITE✘Sync’d on all your devices (even your phone)✘RESTORE History!

(Easy to get back to prior version)

GREAT for Graphic Files, Project Documents

http://dropbox.comhttp://google.com/drive/

Page 8: No more “cowboy coding”

LOCAL DEVWeb Server running WordPress w/ MySQL Databaseon your LOCAL machine

Why? Gives you a Safety Net✘Test things (and break things) w/o hurting anyone✘Test Plugins and Themes✘Learn the WordPress Database✘Great for Client Demos

Page 9: No more “cowboy coding”

LOCAL DEVServerPress’sDesktopServer(Works on Mac or Windows)Automates the WAmP/MAMPStack (whatever that means)

FREE (up to 3 local websites)

http://serverpress.com

Page 10: No more “cowboy coding”

LOCAL DEVVagrantsVVV (or Varying Vagrant Vagrants)Works on ALL OS’s (with some work)(Requires VirtualBox & Vagrant)Creates Virtual Machines all withinyour desktop (more console based)FREE but Complicated

Getting Started Walkthrough:http://torquemag.io/2014/08/getting-started-vagrant-local-development/https://webdevstudios.com/2015/01/14/getting-started-vagrant-vvv-local-development/includes VV List, a VVV Site Wizard

Page 11: No more “cowboy coding”

Learn WordPress DatabaseTwo really good resources to learn the structure of where your files are stored; necessary when you’re doing migrations:

Tour of the WordPress Database:https://deliciousbrains.com/tour-wordpress-database/Tour of the MultiSite WordPress Database:https://deliciousbrains.com/wordpress-multisite-database-tour/Learning phpMyAdmin & WordPress:http://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-database-management-with-phpmyadmin/

Page 12: No more “cowboy coding”

Learn WordPress File StructureSpecifically WP_CONTENT

All your primary files for your WordPress installationare in that directory:/themes/ - all your theme files, active or not/plugins/ - all your plugins, active or not/uploads/ - All the Media files

Site Configuration in wp_config.phphttps://codex.wordpress.org/WordPress_Files#wp-content

Page 13: No more “cowboy coding”

MIGRATIONSThe File & Database are important, because

MINIMUM to copy a WordPress site:wp_content\wp_config.php (configured to connect to DB on new Server)MySQLDUMP file imported into that Database

http://www.billerickson.net/migrating-wordpress-websites/

Page 14: No more “cowboy coding”

MIGRATIONSAutomated Tools for Migrations:

BackupBuddy by iThemes

Handles initial Migration, not sure about ‘changes’

https://ithemes.com/purchase/backupbuddy/

Page 15: No more “cowboy coding”

MIGRATIONSWP Migrate DB &WP Migrate DB Proby Delicious Brains

Handles all Data migrationswith a PUSH/PULL technologyVERY Powerful!

https://deliciousbrains.com/wp-migrate-db-pro/

Page 16: No more “cowboy coding”

WP Migrate DB ProLocal REMOTE

Can also handle MEDIA filesand new version can handle MultiSite(subsites to single install & back)

Page 17: No more “cowboy coding”

Version Control with GITIncredibly powerful, but sometimes Incredibly complicated tool that can save your life (and the life of your project), if you know how to use it.

LUCKILY….

http://wordpress.tv/2015/12/13/morten-rand-hendriksen-github-for-the-rest-of-us/http://mor10.com/github-wcus/

Page 18: No more “cowboy coding”

Git Tools✘GitHub Desktop (Mac & Windows)

https://desktop.github.com/✘BitBucket / SourceTree (Mac & Windows)

https://www.sourcetreeapp.com/✘Tower for Git (paid, Mac Only)

https://www.git-tower.com/✘Additional Tutorials:

https://www.codeschool.com/courses/try-githttps://confluence.atlassian.com/bitbucket/bitbucket-tutorials-teams-in-space-training-ground-755338051.html

Page 19: No more “cowboy coding”

Perfect TeamWith GIT for Version control of my theme stuffand WP Migrate DB Pro to keep my Data in syncthe Cloud for my Graphic Filesand Local Development withVagrant, I’m safe & effective

Page 20: No more “cowboy coding”

Who Am I?Jim True, @jimtrue

Support Lead & Community Manager@podsframeworkhttp://pods.io

Page 21: No more “cowboy coding”

Special Thanks to:Iron Yard TampaSt Pete Campus

Campus Director,Toni Aliberti

@theironyard

Thanks for hosting us every other 1st

Thursday of the Month

Tampa Bay WordPress& WordCamp Tampa

WordCamp Tampa 9/10-11USF Marshall Student Center

tampa.wordcamp.org

WordPress Meetups:meetup.com/Tampa-Bay-WordPress

Slack Chat:tampabaywp.org/chat/