A short routine for the day you inherit someone else’s site.
The part that surprised us
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.
What we changed
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.
How we tested it
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.



Tomas Lindqvist May 19, 2024
I disagree slightly on the rollback plan, but the rest matches what we do.
Grace Tanaka Nov 15, 2024
Thanks for showing the failed attempts as well. That is the useful part.
Omar Haddad May 15, 2025
Could you share the checklist as a plain text file? I would like to adapt it.
Ravi Menon Nov 11, 2025
We do something similar with WP-CLI in our deploy step and it has been solid.
Ravi Menon May 10, 2026
The point about small diffs is the one I keep having to repeat at work.