The home page after a flush is the most honest page on your site.
What we changed
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.
We kept the change small on purpose. It is tempting to tidy everything nearby while the file is open, but every extra line makes the review slower and the rollback riskier. A short diff that does one thing gets merged this week. A long diff that does six things gets argued about until someone quietly closes it.
wp cron event list --fields=hook,next_run_relative
wp transient delete --expired
wp cache flush
How we tested it
Scheduled tasks deserve more suspicion than they get. WordPress runs them on the back of ordinary page views, so a slow job can land on a visitor who did nothing to deserve it. List what is registered, work out what each job does and how long it takes, and move the heavy ones to a real system cron.
Names matter more than cleverness. When a function says exactly what it returns, the template that calls it reads like a sentence and the bug has nowhere to hide. We renamed more than we rewrote on this project, and the reviewers noticed. Six months from now that will be worth more than any micro-optimisation we could have shipped.
What we would do differently
Migrations fail in the details: serialized data, hard-coded URLs and that one plugin nobody remembers installing. We make an inventory before we move anything, then we move it twice, once for practice. The rehearsal always finds something. Finding it on a Wednesday at a desk is much better than finding it on launch night with the client watching.
Tomas Lindqvist Nov 06, 2026
Good write-up. I would add a note about checking the logs before you clear anything.
Grace Tanaka Nov 06, 2026
Tried this on a client site this morning. The query count dropped straight away.
Grace Tanaka Nov 06, 2026
The point about small diffs is the one I keep having to repeat at work.
Omar Haddad Nov 06, 2026
I disagree slightly on the rollback plan, but the rest matches what we do.
Ravi Menon Nov 06, 2026
Thanks for showing the failed attempts as well. That is the useful part.
Noah Bennett Nov 06, 2026
Could you share the checklist as a plain text file? I would like to adapt it.
Ines Costa Nov 06, 2026
This saved me an afternoon. The bit about testing the cold path first is going on the team wiki.
Tomas Lindqvist Nov 06, 2026
We do something similar with WP-CLI in our deploy step and it has been solid.
Noah Bennett Nov 06, 2026
Sending this to a colleague who is about to start a migration next week.
Aisha Khan Nov 06, 2026
Nice. One small correction: that hook fires earlier than the post suggests.
Tomas Lindqvist Nov 06, 2026
We hit the same thing last spring and blamed the host for a month. Wish I had read this then.
Lena Fischer Nov 06, 2026
Does this still hold on a site with a persistent object cache, or does the picture change?