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 full-size slide

  2. Who am I
    &
    What do I do

    View full-size slide

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

    View full-size slide

  4. What am I good at?

    View full-size 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 full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  9. 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 full-size slide

  10. Servers
    and
    networks

    View full-size slide

  11. Understand how a
    server works

    View full-size slide

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

    View full-size slide

  13. ProTip:
    Get NewRelic

    View full-size slide

  14. When things
    go well

    View full-size slide

  15. When
    things
    don’t go
    well

    View full-size slide

  16. When
    things
    go
    slow

    View full-size slide

  17. ProTip: Use CDNs
    Origin Pull FTW.

    View full-size slide

  18. “Managed
    WordPress
    Hosting”

    View full-size slide

  19. Server-side &
    code caching

    View full-size slide

  20. WP-Cron sucks

    View full-size slide

  21. NewRelic background
    tasks - use ‘em

    View full-size slide

  22. 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 full-size slide

  23. Plugins
    or
    DIY?

    View full-size slide

  24. Simple, single use
    plugins

    View full-size slide

  25. Dependancies
    SUCK

    View full-size slide

  26. Caching
    problems

    View full-size slide

  27. Melbourne Cup
    2012

    View full-size slide

  28. 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 full-size slide

  29. 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 full-size slide

  30. Thank you
    benmay.org
    @benjmay

    View full-size slide