Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Enterprise-Scale WordPress

489 views

Published on

WordPress now powers over 25% of sites on the web including big names such as Time, CNN, TechCrunch and more. What changes about a WordPress site when it needs to function on such a large scale? Keanan Koppenhaver will show us how WordPress can be tweaked to serve content to millions of visitors per month, how to keep code modular using custom-built plugins, special considerations for enterprise-sized sites and more! If you've ever wondered what goes into creating and maintaining a high-traffic WordPress site, this will be one you won't want to miss.

Keanan Koppenhaver is a Digital Product Developer and Consulting Engineer with doejo, a WordPress VIP Partner Agency. While at doejo, he has worked on baking WordPress into the publishing workflow of one of the largest investment news publications in the United States, a WordPress-backed real estate investment portal, and many other projects large and small. He is passionate about mentoring other developers as well as teaching people that WordPress can be more than just a blogging platform. Keanan writes about all these topics and more at http://levelupwp.net.

Published in: Technology
  • Be the first to comment

Enterprise-Scale WordPress

  1. 1. Enterprise-Scale WordPress KEANAN KOPPENHAVER @KKOPPENHAVER HTTP://GITHUB.COM/KKOPPENHAVER HTTP://LEVELUPWP.NET KEANAN@DOEJO.COM
  2. 2. Who Am I? • Developer at doejo • Been working primarily on WP projects for the past 3 years • Scaling up from small marketing sites
  3. 3. What’s the #1 rule of Enterprise-Scale WordPress?
  4. 4. Everything takes longer. (and that’s a good thing)
  5. 5. Part 1 | Infrastructure
  6. 6. WordPress VIP
  7. 7. What is WordPress VIP? • Managed Hosting by Automattic • Serves just over 22 billion page views/month • Includes Security, Code Review, and much more • Hosted on the same platform that powers millions of blogs on WordPress.com
  8. 8. WordPress.Com Serves 70,000 Req/Sec And Over 15 Gbit/Sec Of Traffic (2012) Source: http://highscalability.com/blog/2012/9/26/wordpresscom-serves-70000- reqsec-and-over-15-gbitsec-of-traf.html
  9. 9. What if I don’t want to pay $5k+/month?
  10. 10. What if I want to manage it myself?
  11. 11. What kind of traffic are we talking about? • 4-6 million pageviews / month • 20,000 page views / hour (during the work day) • 5 page views every second (among 100s of concurrent connections)
  12. 12. Multiple Environments
  13. 13. Small-Scale FTP KEANAN’S MACBOOK HTTP://KEANANKOPPENHAVER.COM SSH
  14. 14. Enterprise-Scale KEANAN’S MACBOOK HTTP://DEV.KK.COM HTTP://QA.KK.COM HTTP://BETA.KK.COM HTTP://KK.COM
  15. 15. Load Balancing
  16. 16. Small-Scale HTTP://KEANANKOPPENHAVER.COMKEANAN’S MACBOOK
  17. 17. Enterprise-Scale KK-PROD1 KK-PROD2 KK-PROD3 KEANAN’S MACBOOK Load Balancer Icon by Alex WaZa for Noun Project HTTP://KK.COM
  18. 18. Why load balance?
  19. 19. Servers are busy • Serving static assets (HTML/CSS/JS/JPG/PNG/ PDF, etc…) • Processing and serving all needed PHP templates • Making MySQL calls
  20. 20. Enterprise-Scale KK-PROD1 KK-PROD2 KK-PROD3 KEANAN’S MACBOOK Load Balancer Icon by Alex WaZa for Noun Project HTTP://KK.COM
  21. 21. Caching
  22. 22. Servers are busy • Serving static assets (HTML/CSS/JS/JPG/PNG/ PDF, etc…) • Processing and serving all needed PHP templates • Making MySQL calls
  23. 23. Front End Caching
  24. 24. Front End Caching • Cache stored on the user’s machine • Specified expiration date when the asset is “stale” • Saves the server from serving these assets that don’t change • Advanced Mode: Cache busting URL string • Super Advanced Mode: CDN
  25. 25. Back End Caching
  26. 26. https://memcached.org/ Memcached is…often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.
  27. 27. Backend Caching • Memcached saves web server and database server • Prevents blocking DB calls • Must be flushed when changes are made
  28. 28. Phil Carlton, Tim Bray, Jeff Atwood, and many others There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors.
  29. 29. Part 2 | Workflow
  30. 30. Task Management
  31. 31. Task Management • JIRA/Trello • Sprint Planning • Can be tied in with Version Control
  32. 32. Version Control
  33. 33. Version Control • Git (Command Line or Source Tree) • Branches are important • Tie branches and commits to tickets • You may need…
  34. 34. Code Review
  35. 35. Code Review • Peer review of your commits • Included with WP VIP • Useful double check • Useful for learning across the team
  36. 36. Automated Deployments
  37. 37. Automated Deployments • No more manual FTP • Deploy from Version Control • Ensure pre- and post-deployment steps are the same every time • Deployment == One Less Thing To Think About
  38. 38. Part 3 | Dos and Don’ts
  39. 39. ( ^^ functions.php)
  40. 40. DON’T: Dump everything in functions.php • Multiple files with grouped functions • Namespacing • Sanity when Searching • lib/*
  41. 41. DON’T: Dump everything in functions.php (Part 2) • Bigger than a group of functions? Feature Plugin. • Pros: Can be maintained independently • Cons: Has to be maintained independently
  42. 42. DO: Keep request count low • Ad Networks, Analytics, Social Integration, etc • Maximum simultaneous connections (per browser) • Think of the mobile users • Luckily, Dev Tools has your back
  43. 43. In summary…
  44. 44. Everything takes longer. (and that’s a good thing)
  45. 45. Questions? KEANAN KOPPENHAVER @KKOPPENHAVER HTTP://GITHUB.COM/KKOPPENHAVER HTTP://LEVELUPWP.NET KEANAN@DOEJO.COM

×