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.

Speeding up your WordPress Site - WordCamp Toronto 2015

This is a revised talk from the May 2015 presentation I gave to WordCamp Hamilton. At the end of this presentation you should have some ideas on how to speed up your WordPress site from within (plugins, code / theme optimizations) to environmental changes.

  • Login to see the comments

  • Be the first to like this

Speeding up your WordPress Site - WordCamp Toronto 2015

  1. 1. Speed up your WordPress site Alan Lok WirelessLinx Inc.
  2. 2. Motivations User experience1 Search engine optimization2 Your wallet Less on-call issues! 1: 2:
  3. 3. What is a LAMP stack Database PHP Engine Your app Operating System Web Server Performance gains can be found in each layer Reverse Proxy Cache
  4. 4. Internal Tune-ups Digging into your WordPress site to make it better
  5. 5. The simple stuff Update your plugins Remove unused themes and plugins 404 errors
  6. 6. WordPress plugins to speed things up W3 Total Cache Super Cache Zen Cache
  7. 7. Reduce Images, JS,CSS Reuse Code (CSS,JS, HTML,PHP) Refactor HTTP Response Content Body
  8. 8. Profile your application Analyze your application with a PHP profiler such as or xdebug/ cachegrind Look for high number of apply_filters, mysql calls, and wp_cache_get
  9. 9. Profile your DOM Make your page render faster too
  10. 10. Database Check your slow query log Debug: log your database queries Try to “explain” your query Trim un-needed data (comments, deleted posts, etc…)
  11. 11. Have you been hacked? Hacked instances are typically slower because of additional JS/PHP payload Check your installation / hosting environment Some command line tools: wp-cli, Online tools: and Google Webmaster Tools
  12. 12. Operational Improvements Improvements you can make outside WordPress
  13. 13. You get what you pay for There is no such thing as “unlimited” hosting or space Ensure you are paying for the level of performance you expect given the traffic estimates Diminishing returns on performance when buying more resources
  14. 14. Database MySQL versions and variations (MariaDB, Percona, Community) DB Engine: Convert tables from MyISAM to InnoDB Some* my.cnf tuning InnoDB buffer size, Query Caching HyperDB for database splitting* Some performance references:
  15. 15. Web Server Technology Web server technologies: nginx vs Apache PHP process management in Apache php-fpm vs mod_php vs hhvm prefork, vs worker/event mod_pagespeed, php-opcache When does it matter? More food for thought: Credit: Digital Ocean
  16. 16. HTTP changes Content compression Expiry headers for content type Cache directive References:
  17. 17. Content Delivery Reducing number of access to your web server will reduce your costs (bandwidth and CPU needs) Consider using public CDN for shared JS/CSS Pay for a cheap CDN and use a plugin to rewrite your assets to the CDN
  18. 18. Web Application Protection* SaaS: Sucuri / CloudFlare / Incapsula / Akamai Plugins: WordFence / Better WP Security Spam Protection: Akismet PHP: suhosin Server: mod_security *not an exhaustive list or endorsement
  19. 19. Monitor your site Application Performance Monitor (eg. New Relic, AppDynamics) Server Monitoring (eg. LongView, CloudWatch, DataDog) Last mile / Page Health (eg. Pingdom, New Relic Synthetics, Gomez)
  20. 20. Thanks! Twitter: @alan_lok Web: Slideshare: