WordPress

WordPress plugin updates without breaking your site: backup, test, deploy

ยท Krzysztof Balicki

A laptop and service tools on a workbench

WordPress plugin updates go smoothly if you follow the same three steps every time, in the same order: make a backup, test on a copy of the site, then deploy to production and check that everything works. Updates patch plugin security vulnerabilities and bugs. That is why putting them off „until later” is usually more dangerous than the update itself. I wrote this guide for owners and admins of company websites and WooCommerce stores who don’t have their own IT department. Below is the whole process, step by step.

Why can a WordPress plugin update break your site?

Conflicts are the usual culprit: one plugin against another plugin, the theme, the WordPress version or the PHP version on the server. A new release of one plugin can change a function that another plugin relies on. Or it may need a newer PHP version than your hosting provides. The symptoms? They vary. A white screen, a critical error message, a broken layout, and in a store, a cart or payments that suddenly stop working.

The most vulnerable are WooCommerce with its extensions, page builders (plugins for building pages with drag and drop) and payment and shipping plugins. The risk also grows when an update changes the database structure. But skipping updates doesn’t remove that risk. Not at all. What actually reduces it is a process that lets you quickly roll back to the state before the changes.

Step 1: back up before you update

Before every update you need a full copy of your files and database. One you can actually restore, not one that is just „somewhere on the server”. The official WordPress update guide says the same: a backup lets you restore the site if something goes wrong. The backup must include:

  • the database,
  • the wp-content folder with plugins, themes and the files in uploads,
  • the wp-config.php file.

Keep it off the site’s server. A hosting failure can take both the site and the backup down at once. In a store, back up right before the update so you don’t lose fresh orders if you have to restore. And do a test restore now and then (the day of a failure is the worst moment to find out your backup is empty or incomplete).

Step 2: test in a WordPress staging environment

A test environment, or staging, is a copy of your site under a separate address. You use it to check an update with no risk to your customers. Many hosting providers offer one-click staging. You can also set up a copy on a subdomain or locally, on your own computer. Oh, and block indexing and outgoing emails on it. Otherwise customers will get notifications about test orders, and nobody wants that.

Before you click „update”, read the changelog, the list of changes, and check compatibility with your versions of WordPress, WooCommerce and PHP. Update plugins one at a time or in small groups. That way you know which one caused the mess. After each change, go through the checklist:

  1. the home page and key subpages,
  2. contact forms and search,
  3. the cart and a test order,
  4. the admin dashboard,
  5. the PHP error log.

Step 3: deploy to the live site and check after the update

On production, work during your lowest-traffic hours and repeat exactly what passed the test. Nothing more. Right before deploying, make a fresh backup, even if the previous one is only a day old. After the update, go through the same checklist as on staging and clear the cache. Does a plugin ask for a database update? Run it right away.

Sometimes the process stops halfway and leaves a message about a failed update. There is a fix for that: as the WordPress documentation says, delete the .maintenance file from the main installation folder via FTP.

What to do when a plugin update breaks your site?

The fastest fix is to deactivate the plugin that caused the error. If that’s not enough, you restore the backup. And if you can’t get into the dashboard? Rename that plugin’s folder in wp-content/plugins via FTP or your hosting file manager. WordPress stops loading it and that’s it.

On a critical error, WordPress also sends an email to the admin address with a link to recovery mode. You use it to log in to the dashboard and deactivate the faulty plugin. Then you go back to the previous plugin version or restore the full backup and report the problem to the author. With licensed premium plugins, you report the bug to the vendor. At the K4.pl plugin shop, licences include updates and support, and when an off-the-shelf solution doesn’t fit, you can order a custom plugin.

Automatic plugin updates: when to turn them on and when not to?

Auto-updates work well for simple, stable add-ons. But in a store, I think plugins your sales depend on are better updated manually. You turn automatic updates on or off for each plugin separately, in the plugin list in the dashboard. The core works differently: according to the WordPress documentation, minor releases and security fixes install in the background, while major ones have to be approved with a button.

WooCommerce, payment gateways and page builders? Always through testing, no exceptions. Auto-updates only make sense if you have a daily backup and uptime monitoring that alerts you to a failure before your customers notice it.

How often to update and how to plan it in your company?

A fixed rhythm works best. For example, a weekly update review, with security fixes applied right away, without waiting for „update day”. A simple schedule: review the list, back up, staging, deploy and a short note on what went live and when. That note is a small thing, but it makes finding the culprit much faster when something starts behaving differently a few days later.

And then there’s cleanup. Remove unused plugins and ones abandoned by their authors regularly, because each is one more thing to update and one more potential vulnerability. Updating WordPress plugins regularly with the backup, test, deploy routine quickly becomes a habit. And that habit protects both your site and your sales.

Frequently asked questions

Can I update all plugins at once?

Technically, yes. But it’s better to do it one at a time or in small groups. If something breaks after a bulk update, it’s hard to tell which plugin is to blame. When you update one by one, you know right away which one to deactivate.

Is my hosting provider’s backup enough before an update?

Only if it’s up to date, covers both files and the database, and you can restore it yourself without waiting for support. If it’s made once a day at night and your store takes orders during the day, make your own backup right before the update.

Does a small company website need a staging environment?

With a few simple plugins, a fresh backup and updating outside peak hours is usually enough. With a store, a page builder or complex forms, staging is recommended, because there an error costs you lost orders.