Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Caching WordPress - Anthony Burchell Wordcamp Presentation

712 views

Published on

This is a presentation about caching WordPress given for Wordcamp San Antonio

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Caching WordPress - Anthony Burchell Wordcamp Presentation

  1. 1. Advanced Caching Internally and Externally Anthony Burchell @thewpressguy Slides Available at: antpb.com/caching
  2. 2. Why should I Cache? Page load speed will keep readers on your site
  3. 3. Anyone watch Halt and Catch Fire? Cardiff’s goal of building a computer with a system response time of 396 milliseconds can be easily translated to your webpage. A quick response will make users addicted to your product (your site).
  4. 4. Why is it slow?? WordPress is making sometimes thousands of calls to files. These files are then refering to the database to gather content and render the page.
  5. 5. How do I speed it up? There are many many ways to speed things up. The most turn key solution would be caching.
  6. 6. Caching Plugins WP Supercache WP Redis Cache W3 Total Cache WP Fast Cache
  7. 7. THEY’RE ALL GREAT But let’s just focus on two… WP Supercache WP RedisCache
  8. 8. WP Supercache Generates static html files from your dynamic WordPress blog.
  9. 9. Remove Pointless Processing All those php files add up to a simple html page...why not just save that data and display it quicker.
  10. 10. WP Supercache - Caching On
  11. 11. WP Supercache - Advanced Settings
  12. 12. WP Supercache - Advanced Settings
  13. 13. Cool. But what’s the catch? If your content is constantly changing static files will be displaying old content.
  14. 14. Two Ways to Avoid This 1.) Preload Pages 2.) Dynamic Caching
  15. 15. Option 1 - Preload
  16. 16. Preload Problems Content will not update with every refresh but rather on a time interval.
  17. 17. Option 2 Dynamic Content Store content to the output buffer of and statically cache only parts of the page.
  18. 18. It’s a bit confusing but hang in there…
  19. 19. Let’s use the example of AdRotate Pro
  20. 20. Refresh the page…
  21. 21. Refresh again…
  22. 22. AdRotate Pro Required Code <? php adrotate_group(1); ?>
  23. 23. WP-Supercache has a dynamic caching plugin /plugins/wp-super-cache/plugins/dynamic-cache-test.php
  24. 24. Let’s define the string of text WP-Supercache should look for
  25. 25. Let’s store the adrotate function in the output buffer of the plugin
  26. 26. Awesome. Now let’s put the string into the theme.
  27. 27. What if I don’t need dynamic caching? MAKE IT FASTER!
  28. 28. What is Redis? Redis is anadvanced key-value cache and store i.e. It’s freakin quick.
  29. 29. I won’t get into the technical details today. But here is a step by step video tutorial I did configuring. REDIS TUTORIAL
  30. 30. Benefits Can serve pages from external or internal server as fast as .5 second FULL RENDER
  31. 31. Saves a hash key value and ties it to the html data from the page
  32. 32. Also minifies css to further capitalize on the speed Redis handles static content
  33. 33. Q&A
  34. 34. Advanced Caching Internally and Externally Anthony Burchell @thewpressguy Slides Available at: antpb.com/caching

×