$30 off During Our Annual Pro Sale. View Details »

Scaling WordPress

Scaling WordPress

WordPress is powering some of the biggest publishing sites on the web (CNN.com, techcrunch.com, wired.com). It's no accident that one of best CMSes on the web is chosen to be the publishing platform of choice by these content providers. That said, each of these companies have had to work hard to push the limits of the software to scale to meet the needs of their enormous audiences. In my talk, I will discuss the essential ingredients needed for scaling WordPress to millions of users. This talk will include discussion of integrating external services and technologies along with performant PHP practices to provide a stable publishing experience for the masses.

Zack Tollman

March 15, 2015

More Decks by Zack Tollman

Other Decks in Technology


  1. SCALING WORDPRESS with Zack Tollman

  2. None
  3. Slashdot effect Digg effect Reddit effect Farked Drudged

  4. Dinner

  5. Celebration

  6. Phone rings

  7. Not at dinner

  8. https://flic.kr/p/pLarbf

  9. Triage approach to scaling

  10. Stabilize

  11. Diagnose

  12. Treat

  13. Prevent

  14. PAGE CACHING Stabilize with

  15. WordPress as a Static Site https://flic.kr/p/6bun5f

  16. https://medium.com/message/how-paper-magazines-web-engineers-scaled-kim-kardashians-back-end-sfw-6367f8d37688 #breaktheinternet

  17. Reduce Site Load

  18. Batcache

  19. Varnish

  20. Edge Caching

  21. Tips Low TTL to avoid invalidation pains

  22. EXPERIENCE & TOOLS Diagnose with

  23. Database Queries

  24. Remote Requests

  25. Slow Methods

  26. Query Monitor

  27. Query Monitor

  28. XHProf/XDebug

  29. New Relic

  30. OBJECT CACHING Treat with

  31. https://flic.kr/p/bxuzPB

  32. WP_Object_Cache tollmanz.com/grokking-the- wp-object-cache/

  33. Memcached github.com/tollmanz/ wordpress-pecl-memcached- object-cache

  34. APC wordpress.org/plugins/apc/

  35. WordPress core uses object caching

  36. wp_cache_set

  37. wp_cache_get

  38. $args = array(
 'number' => 5,
 'username' => 'tollmanz',

    => false,
 $key = md5( $args );
 $group = 'tweets';
 $tweets = wp_cache_get( $key, $group );
 if ( false === $tweets ) {
 $tweets = get_tweets( $args );
 wp_cache_set( $key, $tweets, $group, 600 );
  39. On Demand

  40. None
  41. None
  42. None
  43. None
  44. Proactive

  45. Proactive On save

  46. Proactive On scheduled event

  47. Stale While Revalidate github.com/markjaquith/ WP-TLC-Transients

  48. Stale While Revalidate Liveblog

  49. A SOLID STACK Prevent with

  50. Edge Network

  51. Edge Network Load Balancer

  52. Edge Network Load Balancer Varnish Varnish

  53. Edge Network Load Balancer Varnish Varnish WEB WEB WEB WEB

  54. Edge Network Load Balancer Varnish Varnish WEB WEB WEB ADMIN

  55. Edge Network Load Balancer Varnish Varnish WEB WEB WEB ADMIN

  56. Object cache + Page cache ——————— Happy life

  57. Zack Tollman @tollmanz tollmanz.com/mwphp15