How to troubleshoot WordPress performance

How to troubleshoot WordPress performance

These are the slides from a talk given at WordCamp Halifax 2017.

Have you ever had a client come up to you and ask why a WordPress page was slow to load? We’ve all had that happen at some point or another. Especially nowadays with the increased importance of page load times! (Everything has to be fast fast fast!)

But what do you do when someone asks you to fix such an issue? It can feel like finding a needle in a haystack. The issue could be anywhere. (It really can!)

So how can you troubleshoot what’s going on? There are a lot of tools at your disposal to help you figure things out. But that doesn’t mean that you’re any closer to knowing what’s going on.

This is what this talk will help you with. We’ll look at the tools that you can use to solve this tricky issue. But we won’t stop there either We’ll also go over how to interpret what these tools are telling you. Because that’s how you’ll get to the root of the issue so that you can fix it.

You can read the companion article at: https://carlalexander.ca/troubleshoot-wordpress-performance

5a4758faa5ba6c1322bdfb0f6ebcf56c?s=128

Carl Alexander

May 27, 2017
Tweet

Transcript

  1. How to troubleshoot WordPress performance

  2. Carl Alexander

  3. @twigpress

  4. carlalexander.ca

  5. None
  6. Common situation

  7. Client: WordPress is slow.

  8. Client: Can you help?

  9. You:

  10. Load times are important

  11. But hard to debug

  12. Needle in a haystack

  13. Issue can be anywhere (It really can!)

  14. Lots of tools available

  15. What’s a WordPress performance issue?

  16. Slowness defines performance issues

  17. Example: Loading a page is slow

  18. Example: Site search is slow

  19. Example: Publishing is slow

  20. Example: “Everything is slow”

  21. WordPress takes too long to do something

  22. Frustrates the client

  23. Has a financial impact

  24. Where can you find them?

  25. What happens when you request a web page?

  26. None
  27. None
  28. Most obvious location

  29. Can be your code

  30. Can be plugin code

  31. Can be theme code

  32. Check PHP code

  33. Check JavaScript code

  34. None
  35. Other common location

  36. Dozens of queries on each page load

  37. Only takes one slow query

  38. None
  39. Hard to diagnose

  40. Hardware and Software

  41. Varies from host to host

  42. Why picking a good host is important

  43. None
  44. Hard to diagnose as well

  45. Browsers are complex

  46. Lots going on between requesting and rendering

  47. Can appear anywhere between both points

  48. Questions?

  49. Browser tools

  50. Web developer tools

  51. Most important tool at your disposal

  52. Available on all browsers

  53. Mandatory tool for web development

  54. Console panel

  55. First panel to look at

  56. None
  57. Shows error messages and warnings

  58. Useful for rendering performance issues

  59. But mostly for JavaScript

  60. Network Panel

  61. None
  62. Look at waterfall first

  63. Scan for long bars

  64. None
  65. Slow first request often means issue with server

  66. None
  67. Time To First Byte (TTFB)

  68. Time between request and start of response

  69. One of the best metrics for application performance

  70. Not a silver bullet

  71. Don’t forget summary!

  72. None
  73. None
  74. None
  75. None
  76. None
  77. Web page analysis services

  78. None
  79. None
  80. Questions?

  81. Server tools

  82. If nothing found in browser

  83. Problem is figuring out where on the server

  84. Two sources of performance issues (Hardware and Software)

  85. Start with WordPress

  86. Query Monitor

  87. Best debugging plugin for WordPress

  88. Collects all sorts of information on WordPress (More than just

    SQL queries!)
  89. Visible from the admin bar

  90. Visible from the admin bar

  91. Visible from the admin bar

  92. Visible from the admin bar

  93. Additional HTTP requests can also slow things down

  94. None
  95. None
  96. None
  97. Database server processes

  98. None
  99. None
  100. SQL query: SHOW FULL PROCESSLIST;

  101. Additional tools (But need access to your server)

  102. Slow logs

  103. MySQL tuner

  104. Application performance monitoring

  105. Questions?

  106. Recapping

  107. How do you use these tools together?

  108. None
  109. None
  110. None
  111. None
  112. Still stuck? Ask for help!

  113. Questions?

  114. Thank you!