There is an update waiting for WooCommerce in your dashboard. Last time you clicked “Update now”, the product pages lost their layout and two customers wrote in saying they could not pay. So this time you have left it, and the little red number next to Plugins keeps growing.
Leaving it is not safe either, so this post covers how to update WooCommerce safely, in a fixed order that keeps the store taking orders. It starts with the situation you may already be in, where an update has broken product pages or checkout and the shop needs to be stable again first. Then it sets out a routine that makes the next update far less eventful.
If the update has already broken the store
Work through these in order. Stop as soon as the shop is taking orders again, then fix the rest calmly.
- Find out what actually changed. Look at Dashboard > Updates or the Plugins screen and note which plugins were updated and roughly when. If auto-updates are on, several may have changed overnight without anyone clicking anything.
- Check your email. When a plugin causes a fatal error, WordPress emails the site’s admin address with details of the plugin involved and a special link to log in using recovery mode. That email often names the culprit directly.
- Look at the WooCommerce logs. Under WooCommerce > Status > Logs, entries with a fatal error source usually include the file path of the code that failed. The folder name in that path tells you which plugin or theme it belongs to.
- Test with the suspect switched off. If the error points to an extension rather than WooCommerce itself, deactivate it and test an order. If you cannot reach the dashboard, renaming that plugin’s folder over SFTP or the host’s file manager deactivates it.
- Clear every cache. Caching plugins, the host’s cache and any CDN can keep serving old files that no longer match the updated plugin. A layout that looks broken sometimes fixes itself once the cache is cleared.
Still no working checkout? The deeper repairs are listed on our help page for sites that fail after updating. Be careful about restoring a full backup on a live store: it brings the database back to the moment the backup was taken, and any orders placed since then vanish from WooCommerce.
Why a WooCommerce update can break more than a typical plugin
Most plugins do one job and touch a small part of the site. WooCommerce sits underneath a whole stack of other code that depends on it:
- Extensions for payments, shipping, invoices, subscriptions and product options all call WooCommerce’s own functions. When WooCommerce changes how something works, an extension that has not caught up can fail.
- Your theme may contain its own copies of WooCommerce template files to change how product pages, the cart or emails look. When WooCommerce changes the original templates, those copies fall behind.
- The database holds your orders, products and customers. Some WooCommerce updates change how that data is stored and need to run a database update after the plugin files are replaced.
That is why an update that is perfectly fine for WooCommerce on its own can still break your particular store. The general picture of how core, plugin and theme updates differ applies here too, but a shop adds these three extra layers.
How to update WooCommerce safely, step by step
1. Read before you click
Open the changelog for the new WooCommerce version and for any extension that also has an update. You are not reading every line. You are looking for words like “breaking”, “removed”, “deprecated”, “requires” and anything about templates, checkout or the database. Many extensions also state in their details which WooCommerce version they have been tested with, under a “WC tested up to” line. If your payment gateway plugin has not been tested with the new version yet, that is a reason to wait.
2. Take a fresh backup
Files and database, stored off the server, taken immediately before you start. Yesterday’s backup is not enough on a store, because it does not include today’s orders.
3. Update a staging copy first
A staging site is a private copy of the store where you can break things without customers noticing. Plenty of hosts include one-click staging. If yours does not, read how to create a private test copy of WordPress first. Refresh the staging copy from live before you begin so you are testing on current data.
4. Update in a sensible order on staging
Update WooCommerce first, then its extensions, then the theme. Run any database update WooCommerce asks for. Updating one thing at a time takes longer, but if something breaks you know exactly which step did it.
5. Test the parts that earn money
On staging, check at least:
- A simple product and a variable product both add to the cart.
- A coupon applies.
- Shipping calculates for a couple of real addresses.
- Checkout completes with the gateway in test mode, if it has one.
- The order appears in the dashboard with the right status, and the emails send.
- Your account page, order history and any invoice download still work.
Then open WooCommerce > Status > System Status and look at the templates section. If it lists outdated template copies in your theme, someone needs to compare them with the new versions before you update live.
6. Repeat on live, at the quietest hour
Check your order history for the hour with the fewest orders and update then. Same order as staging. Then place a real order on the live store with a real payment method, confirm the money reached the gateway, and refund it.
7. Watch for a day
Check the logs and the order list again the next day. Some problems only show up when a background task runs, such as a scheduled email or an automatic order cancellation.
The database update notice
After some WooCommerce updates, a notice appears saying a database update is required. WooCommerce runs that update in the background once you start it. Two things are worth knowing:
- It is why the fresh backup in step two matters. If the database update goes wrong, the backup is your way back.
- Putting the old plugin files back does not reverse a database update. That is one reason a rollback on a store is not always as clean as it sounds.
On a large store the background update can take a while. Leave it to finish rather than repeatedly clicking the button.
Should auto-updates be on for a store?
WordPress lets you switch on automatic updates for each plugin. On a brochure site that is often a reasonable choice. On a shop, think carefully before switching it on for WooCommerce, the payment gateway or anything that touches checkout. An automatic update at three in the morning with nobody testing afterwards is exactly how a store ends up failing payments for a day before anyone notices.
A middle path for a small shop is to leave auto-updates on for minor, low-risk plugins such as a contact form or an image optimiser, and update the commerce plugins by hand, on a schedule, with a test order afterwards.
Rolling back when an update goes wrong
If a WooCommerce or extension update breaks something you cannot fix quickly, you have three options, roughly from gentlest to heaviest:
| Option | When it suits | What to watch |
|---|---|---|
| Deactivate one extension | The problem is in an add-on, not WooCommerce itself | The feature it provides stops working until it is fixed |
| Reinstall the previous plugin version | A plugin update broke things and no database update ran | Download the old version only from the official source or the vendor |
| Restore a backup | Several things broke and nothing else works | Orders placed since the backup are lost unless you save them first |
Whichever you choose, write down the versions involved. When the extension’s developer releases a fix, you will need to know what you rolled back from.
How often to update a store
Small and often is easier than large and rare. A store that is updated on a regular schedule takes small steps each time, and each step is easy to test. A store left for six months takes one enormous step, with many plugins changing at once, and if something breaks it is hard to tell which one did it.
Security updates are the exception to any schedule. If a plugin you use announces a security fix, test and apply it promptly. This kind of routine, done every month with a test order after each round, is the core of woocommerce website maintenance services wherever you get them.
Notes worth keeping
Updating safely depends partly on knowing what changed last time, and memory is unreliable. Each time you update, write down the date, which plugins moved from which version to which, the number of the test order you placed, and anything that looked odd. After a few months that note becomes the most useful document you have about the store, because it tells the next person what has changed and when.
If you would rather not run this routine yourself, or a recent update has left something broken that you cannot trace, our WooCommerce support services page explains what a support session covers.
Next in this series: WooCommerce Stock Not Updating? Six Causes to Check