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.
| Update | Example | Risk | How to apply |
|---|---|---|---|
| Core minor release | 7.1.3 to 7.1.4 | Low | Automatic, on by default |
| Translations | Updated language files | Very low | Automatic |
| Plugin patch release | 4.2.1 to 4.2.2 | Low | Weekly; can be automatic for simple plugins |
| Plugin or theme major release | 4.x to 5.0 | Medium to high | Staging first |
| Core major release | 7.0 to 7.1 | Medium | Staging first, a week or two after release |
| Page builder, WooCommerce, membership or course plugins | Any | High | Always staging first |
| PHP version | 8.2 to 8.3 | High | Staging 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:
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:
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:
- Plugins, starting with the ones that matter least and ending with the big ones: WooCommerce, the page builder, forms.
- The theme, and the child theme if it has its own updates.
- 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:
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:
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?