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.

WordPress website optimization


Published on

This is my presentation from WordSesh 2013.

Published in: Technology, Business
  • Be the first to comment

WordPress website optimization

  1. 1. Need for Speed Gear up Your WordPress
  2. 2. Daniel Kanchev @dvkanchev Before we begin … 7+ Years of WordPress experience 5 Years with SiteGround Love FOSS Addicted to extreme sports
  3. 3. Why bother optimizing Better user experience Better rankings Lower hosting expenses
  4. 4. Make a plan … and follow it! Benchmark loading times Pinpoint performance issues Prioritise problems Start optimizing Benchmark again
  5. 5. Benchmark and find issues
  6. 6. Common problems … completely unordered! Too many posts on the homepage Too many social widgets Too many external fonts used Large/unoptimized Images Themes with too many unused features Too much CSS/JS code No static content compression No caching No CDN
  7. 7. Prioritise problems Sort performance issues by their severity Sort them by the time you need to fix them Cross-reference the two lists
  8. 8. Page size … matters! Make a scroll map test ( ) Reduce the number of posts per page Progressive page loading (infinite scroll)
  9. 9. Social media widgets/plugins … use them wisely! Try not to use “Share on 100 social networks” services Avoid using more than one social plugin
  10. 10. External fonts … trust me, you don’t need 8 fonts on your site! Include only fonts you use, on the pages you use them Put fonts on your local server and include locally Sacrifice the usage of a font for a better site performance
  11. 11. Images … the right size and the right quality Use images with the right size and specify their dimensions Smush your images: Use sprites in your themes
  12. 12. Avoid bloated themes … really, cut the fat! Avoid themes that support every possible website idea Don’t use all theme features on the same page Make sure that the JavaScript and CSS is loaded only when needed
  13. 13. Minify your CSS and JS … the smaller the size, the better! Try using WP Minify: If you’re already using it, enable minify options in W3 Total Cache
  14. 14. Enable gZIP compression … for HTML, CSS and JavaScript! Use .htaccess rules instead of plugins:
  15. 15. Leverage browser caching … whatever that means! The .htaccess rules:
  16. 16. Move your JS code to the footer in WordPress The functions.php code:
  17. 17. Remove WordPress transient records from the database DELETE FROM `wp_options` WHERE `option_name` LIKE ('_transient_%');
  18. 18. Use a CDN service … but do it wisely! Measure if your site is working faster Even local business can take advantage by the CDN Bonus: “Always Online ” service
  19. 19. Cache your content … if you don’t cache your content that’s bad and you should feel bad! Use object caching - Memcached, Redis Use opcode caching - АPC, xCache Use reverse proxies - Varnish, nGinx
  20. 20. WordPress Interaction with Your Database First request goes to the database server
  21. 21. Object Caching First request goes to the database server Objects are also stored in Memcached
  22. 22. Object Caching All consecutive requests are forwarded to the Memcached server
  23. 23. How PHP Works Scanning Lexing Parsing Compilation Opcode Execution
  24. 24. PHP Opcode Caching ! Opcode Execution
  25. 25. Reverse Proxy Servers
  26. 26. Reverse Proxy Servers
  27. 27. Reverse Proxy Servers
  28. 28. Reverse Proxy Servers
  29. 29. Some Key Takes Speed Optimization is a process - do it regularly and you will be rewarded! Always test! Don’t test on a live site, use staging copies instead. Backup! Choose a well optimised host!
  30. 30. Resources:
  31. 31. Thank you! @dvkanchev /