Home/Insights/Security & maintenance

Safe WordPress updates: staging, backups and rollback for live stores

MNBy Madlin Nabil, Senior WordPress Developer & MarTech Specialist··2 min read

“An update broke the site” is one of the most common WordPress emergencies, and almost always avoidable. The fix is a simple habit: change a copy first, keep a way back, then change production. This is the process I use for plugin updates, PHP upgrades and code changes on live stores.

In short
  • Have a staging site that is a recent copy of production.
  • Take a backup before every production change, and know how to restore it.
  • Test the money paths: product page, cart, checkout, payment, order emails.
  • Change production at a quiet time, then test again.

1. A staging site you trust

Most hosts can create a staging copy with one click. Refresh it from production before big changes, so you test on the same plugins, settings and data. Block it from search engines, and turn off emails and webhooks to real customers and systems.

2. Back up before you touch anything

Before every production change, take a backup of what you are changing: the database, or at least the file you are editing. When I fixed a slow search query on a live store, I kept a copy of the original file ready, so a rollback would have taken a minute.

3. Update in small steps

  • Update a few plugins at a time, not 30 at once, so you know what caused a problem.
  • Read the changelog of big updates (WooCommerce, the theme, payment plugins).
  • For PHP upgrades, check the error log on staging after clicking through the site. I upgraded a production store from PHP 8.1 to 8.3 this way.

4. Test the paths that make money

  1. Home, a category and a product page load without errors.
  2. Search and filters work.
  3. Add to cart, change quantity, apply a coupon.
  4. Checkout with each payment method (test mode where possible).
  5. Order email arrives, order reaches your ERP or shipping system.
  6. Analytics purchase event still fires.

5. Change production at the right time

Pick the hour with the fewest orders. Stay available for an hour after the change, and check the error log and new orders.

6. Write it down

Keep a simple change log: date, what changed, who did it, how to undo it. When something breaks a week later, this log answers “what changed?” in seconds, and it protects you when several people work on the same site.

FAQ

Do small stores really need staging?

Yes, if the store makes money every day. Staging is usually included with your host, and one avoided outage pays for the time.

Should I turn on automatic plugin updates?

For small, low-risk plugins it can be fine. For WooCommerce, the theme, page builders and payment plugins, update manually after testing.

What should I do if an update breaks the site?

Restore the backup or roll back that plugin, put the site back in a working state first, and investigate on staging after.

Related insights

See all 23 articles →

Need this for your store?

I build and fix WordPress and WooCommerce sites with marketing in mind: tracking, speed, checkout and integrations.