How to troubleshoot WordPress performance
by
Carl Alexander
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
How to troubleshoot WordPress performance
Slide 2
Slide 2 text
Carl Alexander
Slide 3
Slide 3 text
@twigpress
Slide 4
Slide 4 text
carlalexander.ca
Slide 5
Slide 5 text
No content
Slide 6
Slide 6 text
Common situation
Slide 7
Slide 7 text
Client: WordPress is slow.
Slide 8
Slide 8 text
Client: Can you help?
Slide 9
Slide 9 text
You:
Slide 10
Slide 10 text
Load times are important
Slide 11
Slide 11 text
But hard to debug
Slide 12
Slide 12 text
Needle in a haystack
Slide 13
Slide 13 text
Issue can be anywhere (It really can!)
Slide 14
Slide 14 text
Lots of tools available
Slide 15
Slide 15 text
What’s a WordPress performance issue?
Slide 16
Slide 16 text
Slowness defines performance issues
Slide 17
Slide 17 text
Example: Loading a page is slow
Slide 18
Slide 18 text
Example: Site search is slow
Slide 19
Slide 19 text
Example: Publishing is slow
Slide 20
Slide 20 text
Example: “Everything is slow”
Slide 21
Slide 21 text
WordPress takes too long to do something
Slide 22
Slide 22 text
Frustrates the client
Slide 23
Slide 23 text
Has a financial impact
Slide 24
Slide 24 text
Where can you find them?
Slide 25
Slide 25 text
What happens when you request a web page?
Slide 26
Slide 26 text
No content
Slide 27
Slide 27 text
No content
Slide 28
Slide 28 text
Most obvious location
Slide 29
Slide 29 text
Can be your code
Slide 30
Slide 30 text
Can be plugin code
Slide 31
Slide 31 text
Can be theme code
Slide 32
Slide 32 text
Check PHP code
Slide 33
Slide 33 text
Check JavaScript code
Slide 34
Slide 34 text
No content
Slide 35
Slide 35 text
Other common location
Slide 36
Slide 36 text
Dozens of queries on each page load
Slide 37
Slide 37 text
Only takes one slow query
Slide 38
Slide 38 text
No content
Slide 39
Slide 39 text
Hard to diagnose
Slide 40
Slide 40 text
Hardware and Software
Slide 41
Slide 41 text
Varies from host to host
Slide 42
Slide 42 text
Why picking a good host is important
Slide 43
Slide 43 text
No content
Slide 44
Slide 44 text
Hard to diagnose as well
Slide 45
Slide 45 text
Browsers are complex
Slide 46
Slide 46 text
Lots going on between requesting and rendering
Slide 47
Slide 47 text
Can appear anywhere between both points
Slide 48
Slide 48 text
Questions?
Slide 49
Slide 49 text
Browser tools
Slide 50
Slide 50 text
Web developer tools
Slide 51
Slide 51 text
Most important tool at your disposal
Slide 52
Slide 52 text
Available on all browsers
Slide 53
Slide 53 text
Mandatory tool for web development
Slide 54
Slide 54 text
Console panel
Slide 55
Slide 55 text
First panel to look at
Slide 56
Slide 56 text
No content
Slide 57
Slide 57 text
Shows error messages and warnings
Slide 58
Slide 58 text
Useful for rendering performance issues
Slide 59
Slide 59 text
But mostly for JavaScript
Slide 60
Slide 60 text
Network Panel
Slide 61
Slide 61 text
No content
Slide 62
Slide 62 text
Look at waterfall first
Slide 63
Slide 63 text
Scan for long bars
Slide 64
Slide 64 text
No content
Slide 65
Slide 65 text
Slow first request often means issue with server
Slide 66
Slide 66 text
No content
Slide 67
Slide 67 text
Time To First Byte (TTFB)
Slide 68
Slide 68 text
Time between request and start of response
Slide 69
Slide 69 text
One of the best metrics for application performance
Slide 70
Slide 70 text
Not a silver bullet
Slide 71
Slide 71 text
Don’t forget summary!
Slide 72
Slide 72 text
No content
Slide 73
Slide 73 text
No content
Slide 74
Slide 74 text
No content
Slide 75
Slide 75 text
No content
Slide 76
Slide 76 text
No content
Slide 77
Slide 77 text
Web page analysis services
Slide 78
Slide 78 text
No content
Slide 79
Slide 79 text
No content
Slide 80
Slide 80 text
Questions?
Slide 81
Slide 81 text
Server tools
Slide 82
Slide 82 text
If nothing found in browser
Slide 83
Slide 83 text
Problem is figuring out where on the server
Slide 84
Slide 84 text
Two sources of performance issues (Hardware and Software)
Slide 85
Slide 85 text
Start with WordPress
Slide 86
Slide 86 text
Query Monitor
Slide 87
Slide 87 text
Best debugging plugin for WordPress
Slide 88
Slide 88 text
Collects all sorts of information on WordPress (More than just SQL queries!)
Slide 89
Slide 89 text
Visible from the admin bar
Slide 90
Slide 90 text
Visible from the admin bar
Slide 91
Slide 91 text
Visible from the admin bar
Slide 92
Slide 92 text
Visible from the admin bar
Slide 93
Slide 93 text
Additional HTTP requests can also slow things down
Slide 94
Slide 94 text
No content
Slide 95
Slide 95 text
No content
Slide 96
Slide 96 text
No content
Slide 97
Slide 97 text
Database server processes
Slide 98
Slide 98 text
No content
Slide 99
Slide 99 text
No content
Slide 100
Slide 100 text
SQL query: SHOW FULL PROCESSLIST;
Slide 101
Slide 101 text
Additional tools (But need access to your server)
Slide 102
Slide 102 text
Slow logs
Slide 103
Slide 103 text
MySQL tuner
Slide 104
Slide 104 text
Application performance monitoring
Slide 105
Slide 105 text
Questions?
Slide 106
Slide 106 text
Recapping
Slide 107
Slide 107 text
How do you use these tools together?
Slide 108
Slide 108 text
No content
Slide 109
Slide 109 text
No content
Slide 110
Slide 110 text
No content
Slide 111
Slide 111 text
No content
Slide 112
Slide 112 text
Still stuck? Ask for help!
Slide 113
Slide 113 text
Questions?
Slide 114
Slide 114 text
Thank you!