From Local to Staging to Live Using Version Control & Deployment

From Local to Staging to Live Using Version Control & Deployment

How to setup a (WordPress) website development environment to build sites locally, deploying them to a staging server first before pushing them live.

31af50af29856a3e6734bdae0a0d68cf?s=128

Mark Wilkinson

July 13, 2014
Tweet

Transcript

  1. FROM LOCAL TO STAGING TO LIVE Using Version Control &

    Deployment Tools Mark Wilkinson | @wpmark
  2. WE WILL COVER •  The  Problem  

  3. WE WILL COVER •  The  Problem   •  Local  Development

     Setup  
  4. WE WILL COVER •  The  Problem   •  Local  Development

     Setup   •  Version  Control  
  5. WE WILL COVER •  The  Problem   •  Local  Development

     Setup   •  Version  Control   •  Staging  /  Production  Site  
  6. WE WILL COVER •  The  Problem   •  Local  Development

     Setup   •  Version  Control   •  Staging  /  Production  Site   •  Deployment  
  7. None
  8. THE PROBLEM

  9. FILE TRANSFER PROTOCOL FTP

  10. None
  11. None
  12. None
  13. None
  14. None
  15. None
  16. None
  17. Insanity: doing the same thing over and over again and

    expecting different results Albert Einstein “
  18. SETUP LOCAL DEVELOPMENT

  19. LAMP LINUX/APACHE/MySQL/PHP

  20. MAMP MAC/APACHE/MySQL/PHP

  21. http://localhost

  22. <VirtualHost *:80> DocumentRoot "/Users/usr/Dropbox/Dev/htdocs/mdw" ServerName wpmark.dev ServerAlias www.wpmark.dev </VirtualHost> /Applications/MAMP/conf/apache/extra/httpd-vhosts

  23. None
  24. CONTROL VERSION

  25. TRACK CHANGES

  26. REPOSITORY LOCAL SITE PRODUCTION/LIVE STAGING

  27. REPOSITORY LOCAL SITE PRODUCTION/LIVE STAGING

  28. LOCAL SITE GITHUB FOR MAC

  29. REPOSITORY PRODUCTION/LIVE STAGING DEPLOYMENT TOOL

  30. None
  31. HURDLES http://commons.wikimedia.org/wiki/File:Hurdles_(Scenes_from_a_Track_Meet).jpg

  32. wp-config.php

  33. http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/ if ( file_exists( dirname( __FILE__ ) . '/local- config.php'

    ) ) { include( dirname( __FILE__ ) . '/local-config.php' ); define( 'WP_LOCAL_DEV', true ); } else { // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ }
  34. .gitignore

  35. None
  36. SETUP STAGING/PRODUCTION

  37. STAGING LIVE SERVER Ÿ CLIENT ACCESS

  38. DATABASE SYNCING Ÿ MIGRATION FROM LOCAL

  39. RECAP

  40. DEVELOP LOCALLY

  41. DEVELOP LOCALLY UNDER VERSION CONTROL

  42. DEVELOP LOCALLY UNDER VERSION CONTROL USE DEPLOYMENT NOT FTP

  43. DEVELOP LOCALLY UNDER VERSION CONTROL USE DEPLOYMENT NOT FTP DEPLOY

    TO STAGING FIRST
  44. DEVELOP LOCALLY UNDER VERSION CONTROL USE DEPLOYMENT NOT FTP DEPLOY

    TO STAGING FIRST DEPLOY TO PRODUCTION
  45. DEVELOP LOCALLY UNDER VERSION CONTROL USE DEPLOYMENT NOT FTP DEPLOY

    TO STAGING FIRST DEPLOY TO PRODUCTION DATABASE NOT THAT IMPORTANT
  46. THANK YOU QUESTIONS? Mark Wilkinson | @wpmark