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

Gary Pendergast: WordPress Performance Tuning

Gary Pendergast: WordPress Performance Tuning

When you have a great idea for a site, you need WordPress to scale with you. From your first shared host, through to racks of high powered hardware, how do you get WordPress to keep up?

Learn about the tools and techniques you can use to keep your site running smoothly for it’s entire life, regardless of what the rest of the internet throws at it.

WP Australia

April 27, 2013
Tweet

More Decks by WP Australia

Other Decks in Technology

Transcript

  1. WordPress
    Performance Tuning
    A Narrative

    View full-size slide

  2. Gary Pendergast
    @GaryPendergast
    pento.net

    View full-size slide

  3. IN THE BEGINNING

    View full-size slide

  4. WP SUPER CACHE
    google: wp super cache

    View full-size slide

  5. UPDATE: It’s an
    uncached WordPress
    site, so, no surprise,
    it’s crapped out.

    View full-size slide

  6. ALTER TABLE ENGINE=InnoDB;
    wp_posts

    View full-size slide

  7. ALTER TABLE ENGINE=InnoDB;
    wp_postmeta

    View full-size slide

  8. ALTER TABLE ENGINE=InnoDB;
    wp_users

    View full-size slide

  9. ALTER TABLE ENGINE=InnoDB;
    ............

    View full-size slide

  10. GROWING PAINS

    View full-size slide

  11. innodb_buffer_pool_size

    View full-size slide

  12. query_cache_size = 0
    query_cache_type = 0

    View full-size slide

  13. THINGS THAT ARE BAD
    QUERY CACHE

    View full-size slide

  14. THINGS THAT ARE GOOD
    INNODB BUFFER POOL

    View full-size slide

  15. OPCODE CACHE

    View full-size slide

  16. 001101011
    OPCODE
    CACHE

    View full-size slide

  17. 001101011
    OPCODE
    CACHE

    View full-size slide

  18. APC
    google: php apc

    View full-size slide

  19. MULTI SERVER

    View full-size slide

  20. OBJECT CACHE
    http://wordpress.org/extend/plugins/memcached/

    View full-size slide

  21. BATCACHE
    google: batcache

    View full-size slide

  22. THINK AHEAD
    ... but not too far ahead

    View full-size slide

  23. HYPERDB
    google: hyperdb

    View full-size slide

  24. $wpdb->add_database( array(
    'host' => 'master.server',
    'user' => 'wordpress',
    'password' => 'lol1234',
    'name' => 'wordpress'
    ) );

    View full-size slide

  25. MASTER
    SLAVE SLAVE
    SLAVE

    View full-size slide

  26. $wpdb->add_database( array(
    'host' => 'slave1.server',
    'user' => 'wordpress',
    'password' => 'lol1234',
    'name' => 'wordpress',
    'write' => 0,
    'read' => 1,
    'dataset' => 'global',
    'timeout' => 0.2
    ) );

    View full-size slide

  27. MASTER
    SLAVE SLAVE
    SLAVE
    MASTER

    View full-size slide

  28. MASTER
    SLAVE SLAVE
    SLAVE
    MASTER

    View full-size slide

  29. REPLICATION
    google: mysql replication

    View full-size slide

  30. USE THE TOOLS

    View full-size slide

  31. THINK AHEAD
    ... but not too far ahead

    View full-size slide

  32. automattic.com/work-with-us
    QUESTIONS?
    @GaryPendergast

    View full-size slide