Menu

Updated 12 WordPress plugins and something broke: bisect the batch instead of rolling back everything
📰

Updated 12 WordPress plugins and something broke: bisect the batch instead of rolling back everything

DEV Community: php·Alhiane Lahcen·about 15 hours ago
#e4pIT8DS
#devto#dev#back#plugin#plugins
Reading 0:00
15s threshold

You click "Update all" on twelve plugins. Five minutes later a client tells you the checkout button does nothing.

Most update guides end at "take a backup first" and "roll back if something breaks". Rolling back the whole batch works, but it also undoes eleven updates that were fine. Some of them may be security fixes you updated for in the first place.

Rolling back one plugin at a time is safer, but with twelve suspects it can take twelve tries.

There is a faster way: roll back half, test, and keep halving. Twelve updates take about four tests. This post shows how to do it with WP-CLI, and the one case where it gives a misleading answer.

Before you start: is it really one of the updates?

Spend two minutes on this. It saves an hour.

Reproduce it on purpose. Write down the exact URL and steps, and whether it fails logged in, logged out or both. Clear the page cache and test again. If you can't make it fail on demand, you can't bisect it.

Check what else changed. Did core update in the same window?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.