Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ben May: Working with massive WordPress sites, clients and enterprise

Ben May: Working with massive WordPress sites, clients and enterprise

Slow websites are bad and as websites grow in traffic, slow websites get slower. It’s often a wise move to invest a small amount of time in the early stages of a site’s life to think about performance and scaling. How you can work with larger sites when it comes to caching, file management (version control), SQL performance and front-end optimisation.

WP Australia

April 27, 2013
Tweet

More Decks by WP Australia

Other Decks in Technology

Transcript

  1. Working with
    massive WordPress
    sites, clients and
    enterprise
    Ben May
    benmay.org
    @benjmay

    View Slide

  2. Who am I
    &
    What do I do

    View Slide

  3. I am not an expert
    (ProTip: don’t listen to what I say)

    View Slide

  4. What am I good at?

    View Slide

  5. 1%
    5%
    10%
    10%
    30%
    45%
    Backend Dev
    Sysadmin
    Design (Critic)
    Frontend Dev
    Project Manager
    Designer (Pixel Pusher)
    If I was a pie chart

    View Slide

  6. View Slide

  7. What is
    “enterprise”
    (to me)?

    View Slide

  8. 2 types of
    enterprise
    1. Corporate enterprise
    2. Enterprise performance

    View Slide

  9. The road to
    happiness
    1. Servers and networks
    2. Server side & code caching
    3. Plugins or DIY?
    4. Themes
    5. ?
    6. Profit

    View Slide

  10. Firstly, how I do it
    1. Batcache (advanced-cache.php)
    2. APC or Memcached (object-cache.php)
    3. Git on Beanstalk w/ auto deployments
    4. Mark Jaquith’s skeleton
    5. Basecamp (todo manager)
    6. EdgeCast CDN (Origin Pull)

    View Slide

  11. View Slide

  12. Servers
    and
    networks

    View Slide

  13. Understand how a
    server works

    View Slide

  14. You don’t need to
    be an expert at
    everything

    View Slide

  15. ProTip:
    Get NewRelic

    View Slide

  16. When things
    go well

    View Slide

  17. When
    things
    don’t go
    well

    View Slide

  18. When
    things
    go
    slow

    View Slide

  19. ProTip: Use CDNs
    Origin Pull FTW.

    View Slide

  20. View Slide

  21. “Managed
    WordPress
    Hosting”

    View Slide

  22. View Slide

  23. Server-side &
    code caching

    View Slide

  24. WP-Cron sucks

    View Slide

  25. NewRelic background
    tasks - use ‘em

    View Slide

  26. View Slide

  27. Default transient
    usage sucks
    // Get any existing copy of our transient data
    if ( false === ( $blah = get_transient( 'blah' ) ) )
    {
    // It wasn't there, so regenerate the data and
    // save the transient
    $blah = new WP_Query( 'cat=5' );
    set_transient( 'blah', $blah );
    }
    // Use $blah like you would have normally...
    codex.wordpress.org/Function_Reference/get_transient

    View Slide

  28. View Slide

  29. Plugins
    or
    DIY?

    View Slide

  30. Simple, single use
    plugins

    View Slide

  31. Dependancies
    SUCK

    View Slide

  32. View Slide

  33. Themes

    View Slide

  34. View Slide

  35. View Slide

  36. Caching
    problems

    View Slide

  37. Melbourne Cup
    2012

    View Slide

  38. By 9am - 40,000 page impressions
    Peaked at 20,000 requests per second
    1m+ page views for the day
    250,000+ uniques for the day
    Twice the amount of traffic than Fox Sports*
    * According to the measurement company Effective Measure

    View Slide

  39. As a media publisher, you
    live for the moment when
    you get MASSIVE traffic like
    this...... You love this
    moment, but also in the
    back of your mind is the
    fear your site will not be
    able to handle the demand.

    ~ Zac Zavos
    The Roar
    conversant-media.com

    View Slide

  40. Thank you
    benmay.org
    @benjmay

    View Slide