Why we leave a seam in the code instead of a note in the readme.
What to check next
Every feature has a running cost, even when nobody touches it. It needs testing on each upgrade, explaining to each new editor and checking in each review. When a client asks for something small, we ask who will look after it in two years. Sometimes the honest answer is that it should stay a good idea.
Clients rarely remember the clever parts. They remember whether the site stayed up, whether the invoice matched the estimate and whether someone answered when it broke. We try to write code with that in mind. A plain solution that a tired person can repair at the end of a long day beats an elegant one.
The short version
Writing it down was the last step and possibly the most useful one. A short note about what we tried, what failed and why we stopped has saved us more time than any tool. When this comes up again, and it will, someone will search the repository, find these paragraphs and skip the whole expensive afternoon.
We started by reading the code rather than the documentation, because the code is what runs. Most of the surprises in a WordPress project live in the gap between what a function promises and what the theme actually asks of it. An hour with the templates open told us more than a week of status meetings ever had, and it gave us a list of real questions to bring to the client.
What we found first
The first measurement is always the most useful one, even when it is rough. Write down the query count, the page weight and the time to first byte before you change anything. Without those numbers you cannot tell an improvement from a coincidence, and three weeks later nobody will remember what the site felt like before you touched it.
Caching hides problems as often as it solves them. A page that is fast only when the cache is warm is a page that falls over on the morning after a release, which is exactly when people are looking at it. Test the cold path on purpose. Clear everything, load the home page once, and read what the database had to do.
Why it matters
Nothing here needed a new plugin. The fix was a small change to a query and a better idea of when to run it. That is usually the case: the expensive part of a site is rarely the code you can see, and adding a layer on top only moves the cost somewhere harder to find. Delete first, then decide what is still missing.
Escaping belongs at the point of output, where a reviewer can see it. When a value has been cleaned three functions earlier, nobody can tell by reading the template whether it is safe, and the next person to touch that line will not know either. We moved every escape next to its echo and the file got shorter and easier to trust.
The part that surprised us
The review took longer than the fix, and that is the right way round. Most of the time went on working out what the code was meant to do and who depended on it. Once that was written down, the change itself was four lines, a test and a note in the changelog that future maintainers will actually thank us for.
A throwaway site is the cheapest tool in the kit. We can build one in a minute, break it completely and delete it without a single awkward conversation. Everything risky in this post happened there first, including the mistakes we are not going to mention, and nothing touched production until it had survived a full run from a clean start.
What we changed
Releases go badly when they are exciting. Our best ones are dull: a checklist, a backup someone has actually restored, a rollback plan and a time of day when the people who can fix things are awake. If your release needs courage, something earlier in the process needs more attention, and a calmer Tuesday afternoon will show you what it is.
Keyboard testing costs nothing and finds real bugs. Put the mouse in a drawer and try to use the page with the tab key alone. You will find focus styles that vanish, menus you cannot leave and buttons that are really links. None of these need a specialist to spot, and most of them take minutes to put right.



Daniel Reyes Jan 10, 2025
The point about small diffs is the one I keep having to repeat at work.
Aisha Khan Mar 25, 2025
Sending this to a colleague who is about to start a migration next week.
Omar Haddad Jun 07, 2025
Nice. One small correction: that hook fires earlier than the post suggests.
Grace Tanaka Aug 20, 2025
This saved me an afternoon. The bit about testing the cold path first is going on the team wiki.
Ravi Menon Mar 30, 2026
Good write-up. I would add a note about checking the logs before you clear anything.
Omar Haddad Nov 02, 2025
We hit the same thing last spring and blamed the host for a month. Wish I had read this then.
Daniel Reyes Jan 15, 2026
Does this still hold on a site with a persistent object cache, or does the picture change?
Aisha Khan Jun 12, 2026
Tried this on a client site this morning. The query count dropped straight away.
Grace Tanaka Aug 25, 2026
I disagree slightly on the rollback plan, but the rest matches what we do.