Improving WordPress Performance, June 2013

Our June 2013 meetup was Improving WordPress Performance. Topher DeRosia, Brian Richards, and Chad Warner talked about various ways to make WordPress sites load faster. Below are the video and notes from the meetup.

Also, Brian encouraged the group to get involved in WordCamp Grand Rapids 2013 by volunteering, speaking, and/or sponsoring.

Transients

  • Transients temporarily store cached data in the database
    • You can configure them to be stored in cache rather than the database, which is even faster
  • Transients are site-wide, so make sure they should apply to all users
  • You set expiration
  • Transient API
  • Mark Jaquith’s WP-TLC-Transients extends WordPress’ transients
  • Remember where you save transients so you don’t waste time troubleshooting
  • Topher wrote Storing complex queries in transients

Performance testing tools

CloudFlare

CloudFlare CDN features

  • No configuration necessary
  • Works with static and dynamic content
  • Always Online™

Web content optimization features

  • Rocket Loader
  • Reduced connections
  • AutoMinify
  • Local storage caching
  • Cache header optimization
  • Asynchronous resource loading
  • JavaScript bundling
  • Aggressive GZIP

W3 Total Cache configuration

  • Follow Installation instructions and accept defaults, then configure the following:
  • WordPress menu > Performance > General Settings > Page cache: Enable
  • Performance > General Settings > CloudFlare
  • Minification: CSS, JavaScript, and HTML
  • Performance > Browser Cache > General > enable/check Set expires header

Ways to improve WordPress performance (in order of increasing complexity)

  1. Caching plugin
  2. nginx, which is faster than Apache for serving static content
  3. Memcache and memcached
  4. APC (Advanced PHP Cache)
    1. Caches code, not content
    2. Turns interpreted code into binary and stores it

WP Super Cache

  • WP Super Cache doesn’t have as many options as W3 Total Cache
  • Topher doesn’t like W3 Total Cache because it’s “arrogant” and “rude”; it doesn’t respect other caching plugins.
  • Stores cached files in /wp-content/cache/supercache
  • Simply install and activate to start caching, but configure for better performance

Configuration: Tools > WP Super Cache

  • Advanced tab
    • Select mod_rewrite
    • Enable Don’t cache pages for known users
    • Enable Don’t cache pages with GET parameters
    • Enable Cache rebuild
    • Expiry Time & Garbage Collection
      • Settings depend on your site and preferences
    • Exceptions: configure items that should not be cached
    • Directly Cached Files: specify non-WordPress sites to cache
  • CDN tab: configure for your CDN, if necessary
  • Contents tab: lets you empty the cache
  • Preload tab: crawls site to build the cache
  • Plugins tab: configure plugins that integrate with WP Super Cache
  • Debug tab: used for debugging

One comment

  1. Craig says:

    Ever consider just generating static pages, that would load far faster, or even just static content, instead of each page, loading 100’s and 1000’s of queries and page logic.

    The more customization you offer, the more you get in the way of the real performance that wordpress just fails at.

Leave a Reply

Your email address will not be published. Required fields are marked *