Successfully reported this slideshow.

Coding, Scaling, and Deploys... Oh My!

19

Share

Loading in …3
×
1 of 43
1 of 43

Coding, Scaling, and Deploys... Oh My!

19

Share

Download to read offline

You're a professional WordPress developer in charge of a professional WordPress site. It's time to have professional development and deployment practices.

You're a professional WordPress developer in charge of a professional WordPress site. It's time to have professional development and deployment practices.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Coding, Scaling, and Deploys... Oh My!

  1. 1. Coding Mark Jaquith “JAKE-with” Scaling and @markjaquith Deploys mark@jaquith.me markjaquith.com O hM y! Friday, August 12, 11
  2. 2. Meanwhile, in 2006... Photo by Sco Beale (Laughing Squid) Friday, August 12, 11
  3. 3. Cowboy Coding Friday, August 12, 11
  4. 4. PE R! BA D! AD DE VELO B Cowboy Coding Friday, August 12, 11
  5. 5. bnj.com/cowboy-coding-pink-sombrero Friday, August 12, 11
  6. 6. VCS • or • GTFO Friday, August 12, 11
  7. 7. WordPress in your repo Friday, August 12, 11
  8. 8. My Ideal index.php wp-config.php content/themes/ content/plugins/ content/uploads/ (ignored) wp ➠ EXTERNAL Friday, August 12, 11
  9. 9. Local Development Friday, August 12, 11
  10. 10. 1. MAMP, XAMPP, other 2. /etc/hosts 3. local-config.php Friday, August 12, 11
  11. 11. if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) { include( dirname( __FILE__ ) . '/local-config.php' ); define( 'WP_LOCAL_DEV', true ); } else { define( 'WP_LOCAL_DEV', false ); define( 'DB_NAME', 'production_db' ); define( 'DB_USER', 'production_user' ); define( 'DB_PASSWORD', 'production_password' ); define( 'DB_HOST', 'production_db_host' ); } Ignore local-config.php so it doesn’t get checked in. Friday, August 12, 11
  12. 12. Deploying — with — Friday, August 12, 11
  13. 13. 1. gem install capistrano 2. gem install railsless-deploy 3. gem install capistrano-ext Friday, August 12, 11
  14. 14. releases/ current => {current-release} shared/cached-copy shared/files/ Friday, August 12, 11
  15. 15. checked in: content/uploads => ../../files/uploads/ done on deploy: files => /srv/www/example.org/shared/files/ Friday, August 12, 11
  16. 16. Scaling a Single Server Friday, August 12, 11
  17. 17. nginx Friday, August 12, 11
  18. 18. proxy to Apache or PHP-FPM Friday, August 12, 11
  19. 19. PHP Opcode Cache Friday, August 12, 11
  20. 20. WP Object Cache Friday, August 12, 11
  21. 21. HTML Output Cache Batcache || W3 Total Cache Friday, August 12, 11
  22. 22. Fragment Caching if ( $html = wp_cache_get( 'expensive-html-chunk', 'my-theme' ) ) { echo $html; } else { $html = dynamically_generate_foo(); wp_cache_set( 'expensive-html-chunk', $html, 'my-theme', 3600 ); echo $html; } Friday, August 12, 11
  23. 23. MySQL Query Cache Friday, August 12, 11
  24. 24. CDN — with — Origin Pull Friday, August 12, 11
  25. 25. The Plan Friday, August 12, 11
  26. 26. The Plan What happens if we outgrow our server? Boss Tech Friday, August 12, 11
  27. 27. The Plan What happens if we outgrow our server? We’ll just add new Boss servers! Tech Friday, August 12, 11
  28. 28. The Plan What happens if we outgrow our server? We’ll just add new Boss servers! Brilliant! Tech Friday, August 12, 11
  29. 29. The Plan Friday, August 12, 11
  30. 30. The Reality Friday, August 12, 11
  31. 31. The Reality Our site is slow. Let’s add another server. Boss Tech Friday, August 12, 11
  32. 32. The Reality Our site is slow. Let’s add another server. Uh... Boss Tech Friday, August 12, 11
  33. 33. The Reality Our site is slow. Let’s add another server. Uh... Boss So this will take like 5 minutes, right? Tech Friday, August 12, 11
  34. 34. Have a plan Not an idea Friday, August 12, 11
  35. 35. Multiple Servers Friday, August 12, 11
  36. 36. Load Balancing Friday, August 12, 11
  37. 37. Sharing Uploads Friday, August 12, 11
  38. 38. Memcached Friday, August 12, 11
  39. 39. Rinse & Repeat Friday, August 12, 11
  40. 40. HyperDB Friday, August 12, 11
  41. 41. Maintaining Servers with Puppet Friday, August 12, 11
  42. 42. This is the start of a larger conversation Friday, August 12, 11
  43. 43. Mark Jaquith “JAKE-with” Thanks! @markjaquith mark@jaquith.me markjaquith.com Friday, August 12, 11

×