How to update WordPress without breaking anything

Back up, update on a staging copy one component at a time, test a fixed list of pages, then repeat on live. The routine, the WP-CLI commands and rollbacks.

By Sohail Hussain21 November 20265 min read

Back up first. Then apply updates on a staging copy, one component at a time: plugins, then the theme, then WordPress core. After each one, check a fixed list of pages and forms. When staging is clean, repeat the same updates on the live site in the same order, at a quiet hour, with the backup ready. The exception is minor security releases: let those install automatically.

Most "the update broke my site" stories come from skipping one of those steps. Usually it is staging, or updating twenty things at once and then not knowing which one caused the problem.

This is the routine we follow on WordPress sites under website care and maintenance, written so you can follow it yourself.

Which updates can you apply straight away?

Updates do not carry the same risk.

UpdateExampleRiskHow to apply
Core minor release7.1.3 to 7.1.4LowAutomatic, on by default
TranslationsUpdated language filesVery lowAutomatic
Plugin patch release4.2.1 to 4.2.2LowWeekly; can be automatic for simple plugins
Plugin or theme major release4.x to 5.0Medium to highStaging first
Core major release7.0 to 7.1MediumStaging first, a week or two after release
Page builder, WooCommerce, membership or course pluginsAnyHighAlways staging first
PHP version8.2 to 8.3HighStaging first

Automatic updates are managed under Dashboard → Updates, and per plugin on the Plugins screen. In wp-config.php, this setting keeps automatic core updates to minor releases only, so major releases wait for your staging test:

php
define( 'WP_AUTO_UPDATE_CORE', 'minor' );

The WordPress upgrade documentation strongly discourages switching automatic updates off altogether. Minor releases are where security fixes arrive.

What should you do before you press Update?

Read what is changing. For major releases, read the changelog and skim the plugin's support forum. Look for breaking changes, new minimum PHP or WordPress versions, and a burst of new support threads since the release. Waiting a week after a major plugin release costs nothing and lets others find the bugs.

Take a backup and confirm it exists. The upgrade documentation calls checking that your backups are there and usable "essential". A host snapshot taken just before updating is the fastest rollback. How to back up a WordPress site properly covers the setup.

Copy the live site to staging. Most managed hosts make a staging copy in one click; staging sites explains the options when yours does not. On the staging copy, set the environment type and send PHP errors to a log file instead of the screen:

php
define( 'WP_ENVIRONMENT_TYPE', 'staging' );
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Errors then go to wp-content/debug.log. Separately, make sure staging cannot send real emails to customers or take real payments.

In what order should you update?

On staging, one at a time, checking the site after each:

  1. Plugins, starting with the ones that matter least and ending with the big ones: WooCommerce, the page builder, forms.
  2. The theme, and the child theme if it has its own updates.
  3. WordPress core.

This is our order, not a rule. Plugin authors usually ship compatibility updates before a core major release, so updating plugins first means testing them on the core version you already run, and then testing the new core against plugins that expect it. If you are more than two major versions behind, the upgrade documentation advises updating core in steps rather than in one jump.

With WP-CLI, the routine looks like this:

bash
wp db export before-updates.sql
wp plugin list --update=available
wp plugin update contact-form-7
wp plugin update woocommerce
wp theme update --all
wp core update
wp core update-db

wp core update-db runs any database upgrade the new core version needs; after a one-click update, the dashboard prompts you to do the same. Save the output of wp plugin list before and after, and compare the two in our diff checker to confirm exactly what changed.

What should you test after each update?

Keep a written list so the check takes ten minutes, not an afternoon of clicking around. Ours covers:

  • The homepage and one page of each main template: service page, blog post, archive, contact.
  • Every form: submit it, and confirm the email arrives and any CRM entry is created.
  • For stores: add to cart, check out with a test payment, and the order email.
  • Logging in, and editing a page in the editor the team uses.
  • The error log, wp-content/debug.log, for new warnings or fatal errors.
  • The browser console on the homepage, for new JavaScript errors.
  • The site on a phone.

When staging passes, apply the same updates on live in the same order and run the same checks there. Do it at your lowest-traffic hour, and not on a Friday afternoon.

How do you roll back an update that broke the site?

A plugin update broke something. Reinstall the version you had before. With WP-CLI, replacing the version number with your previous one:

bash
wp plugin install contact-form-7 --version=1.2.3 --force

Without WP-CLI, plugin pages on WordPress.org list previous versions under the Advanced tab, or restore the plugin from your backup. Then pause automatic updates for that plugin until a fix is released.

The site shows "There has been a critical error on this website". WordPress catches fatal errors and emails the site's admin address a link to recovery mode, which lets you log in with the faulty plugin or theme paused. Check that inbox first. If you cannot get in, rename the plugin's folder in wp-content/plugins/ over SFTP, and WordPress will deactivate it.

An automatic plugin update failed. Since WordPress 6.6, if a plugin auto-update causes a fatal error, WordPress restores the previous version itself and emails the admin. This covers automatic updates only, not ones you click.

Several things broke at once. Restore the backup or the host snapshot. This is why you took one.

How often should you update?

Weekly for security releases of plugins and themes, because the gap between a flaw being published and bots exploiting it can be days. Monthly for the full staging routine above, covering everything else. Core major releases within a few weeks of release, usually after the first minor fix arrives.

The cost of not updating compounds. A site a year behind needs several major versions of everything at once, and that is the update that breaks things. The monthly WordPress maintenance checklist puts updates alongside the other routine checks, and WordPress for business websites covers who should own them.

Was this guide useful?

Questions

Frequently asked.

Should I turn on automatic updates for plugins?

For small, single-purpose plugins with a good record, yes; the security benefit outweighs the risk. Keep manual, staged updates for plugins the business depends on: page builders, WooCommerce and its extensions, forms, memberships and anything custom. Check the site after every automatic update you are emailed about.

Do I need to deactivate plugins before updating WordPress?

For a normal one-click update from the dashboard, no. The official documentation asks you to deactivate plugins only for a manual upgrade, where you replace the files yourself. Testing the update on a staging copy first is a better safeguard than deactivating plugins on a live site.

What if my host does not offer staging?

Use a staging plugin that clones the site to a subdomain, or copy the site to a local environment. If none of that is possible, update on live one item at a time, at a quiet hour, straight after a backup, and check the key pages between each update.

Sohail Hussain

Founder, MSH Technologies

Sohail has designed and built websites, web apps and AI products for over 12 years, for clients from Singapore-based industrial groups to early-stage SaaS startups. He writes about what actually worked.

Keep reading

Related guides.

All posts

Your next move

Like what you see? Tell us about it.

A process that takes too long, a website that undersells you, or an idea ready to take shape. Tell us where you are and we will suggest a useful next step.

India · Working with clients worldwide

Sohail, Founder, replies within 1 working day (Mon–Sat, IST). Free and no obligation.