PB-2602: Slow hook
Paul Bunyan code PB-2602 (Warning): Slow hook. What it means and what to do.
On this page
What it means
Everything attached to one WordPress hook took longer than the slow-hook threshold in total.
What to do
Add the hook to the watch list in Settings to see each function on it.
Common causes
- Many plugins attached to the same busy hook (
init,wp_loaded,template_redirect,wp_head,wp_footer). - One slow function on the hook (PB-2601) making the whole hook slow.
- A hook that runs many times in one request, such as
the_contenton a page with many posts.
How to find and fix it
- The first time a hook runs slow, Paul Bunyan adds it to the watch list, so later requests time each function on it. You can also add it in Settings → Watch list.
- Open a later request with the same hook: the slowest function on it is named with its plugin, file and line.
- Then treat it as a slow function (PB-2601).
Details
| Code | Severity | Group |
|---|---|---|
| PB-2602 | Warning | Code |
