Updates and backups: a routine that holds up

Updating WordPress is not hard. The hard part is doing it every week without breaking payments, shipping or forms – and being able to roll back when it happens anyway. This is the routine we use ourselves.

Last checked:

ChecklistWhat we learned about updates
  • Byte for byte
  • Translations can vanish
  • Fix your own bugs fast
  • Check again after a week

What WordPress updates by itself

Existing WordPress sites get minor core updates – maintenance and security – automatically. Major versions only arrive by themselves on sites installed from version 5.6 onwards. Plugins and themes only update automatically in special cases, while translations update by default. The WP_AUTO_UPDATE_CORE constant controls this and overrides the wp-admin setting: true allows everything, false turns it all off, and 'minor' allows only minor updates.

On 19 Nov 2026 the latest version was 7.1.5, and wordpress.org’s API also offered 7.0.9 as an automatic update to sites still on 7.0.

What should update automatically?

PartAutomatic?Why
WordPress, minor versions (7.1.x)YesPure fixes, rarely a problem
WordPress, major versions (7.x)No, after testing on stagingChanges the editor, blocks and APIs
TranslationsYesNo code, only text
Small plugins without payments (e.g. spam filter)YesLow risk, fast security fixes
Payments, shipping, accounting, formsNo, manually with a test orderA bug here costs orders
Page builder and themeNoCan change the layout of every page
Our default on company sites and small shops. Major WordPress versions we apply manually after testing.
# Only minor core updates automatically
wp config set WP_AUTO_UPDATE_CORE minor

# Automatic updates for selected plugins – not all
wp plugin auto-updates enable akismet
wp plugin list --fields=name,version,auto_update

Staging before production

Staging is a copy of the site at another address where you can update without customers seeing it. Many hosts include it. Simply.com, for example, shows no test environments on its smallest plan, one on Standard and three or eight on the larger plans. If your host does not offer it, you can make a copy with WP-CLI:

# On production: export
wp db export prod.sql

# On staging: import and change the address (try --dry-run first)
wp db import prod.sql
wp search-replace 'https://example.dk' 'https://staging.example.dk' --all-tables --dry-run
wp search-replace 'https://example.dk' 'https://staging.example.dk' --all-tables

# Staging must not be indexed and must not e-mail customers
wp option update blog_public 0

The last point matters. A copy of a shop can send order mails, newsletters and reminders to real customers if nobody stops it. Turn mail off or route it to a test inbox before you do anything else on staging.

An update script with backup and checks

This is a simplified version of the routine we run. It takes a backup, shows what will be updated, updates, and finally checks that the front page still responds. If the check fails, the script exits with an error code so your monitoring can alert you.

#!/usr/bin/env bash
# update.sh – run in the site's root folder, e.g. from cron once a week
set -euo pipefail

SITE_URL="https://example.dk"
STAMP=$(date +%F-%H%M)
mkdir -p ../backup

# 1) Back up the database and wp-content (copy it off the server afterwards)
wp db export "../backup/db-$STAMP.sql"
tar -czf "../backup/wp-content-$STAMP.tar.gz" wp-content

# 2) What will be updated?
wp plugin update --all --dry-run

# 3) Update: core (minor only), plugins, themes, translations
wp core update --minor
wp core update-db
wp plugin update --all
wp theme update --all
wp language core update
wp language plugin update --all

# 4) Check: does the front page respond without a critical error?
PAGE=$(mktemp)
CODE=$(curl -s -o "$PAGE" -w '%{http_code}' "$SITE_URL/")
if [ "$CODE" != "200" ] || grep -qiE "kritisk fejl|critical error" "$PAGE"; then
  echo "ERROR after update: HTTP $CODE – restore from ../backup/db-$STAMP.sql" >&2
  exit 1
fi
echo "OK: $SITE_URL returns 200 after the update"

If a plugin broke, roll back to the previous version with wp plugin install <slug> --version=<previous> --force. That works for wordpress.org plugins. For paid plugins, keep the old ZIP file yourself.

On a multisite network you can see updates for every site at once:

wp site list --field=url | xargs -I{} wp --url={} plugin list --update=available --fields=name,version,update_version

What we learned about updates

  • Byte for byte. On the first client site where we replaced every third-party plugin – the website of a Danish bathroom-renovation company – 13 of the site’s 16 plugins are now ours, byte-identical to our code repository. So we know exactly which version is running.
  • Translations can vanish. A plugin installed outside wordpress.org must ship its own .mo files. Without them WordPress silently falls back to English.
  • Fix your own bugs fast. In our own CVR lookup plugin, an unknown CVR number used to show the nearest other company. Version 0.5.5 accepts only an exact CVR. Fixes like that only arrive if the site is updated.
  • Check again after a week. When we switch a plugin, we check after a day and again after seven days. Many bugs only show when a scheduled task runs or a customer uses a rare payment method.

Backups: 3-2-1 and a tested restore

A backup has to work on a bad day. We use 3-2-1: three copies, on two kinds of storage, one of them away from the server. The host’s own backup counts as only one copy, because it disappears with the account if something goes wrong there.

It is also a legal requirement. GDPR Article 32 requires “the ability to restore the availability and access to personal data in a timely manner in the event of a physical or technical incident” and a process for regular testing. In 2024 a Danish IT provider was fined DKK 40,000 following a recommendation from Datatilsynet, partly because the backup of a chiropractic clinic had never been restore-tested and was encrypted along with everything else.

# Restore test on staging, once a quarter
wp db import ../backup/db-2026-11-19-0300.sql
tar -xzf ../backup/wp-content-2026-11-19-0300.tar.gz
wp search-replace 'https://example.dk' 'https://staging.example.dk' --all-tables
wp core verify-checksums && wp plugin verify-checksums --all

Write down how long the restore took. That is the number you need when someone asks how long the site can be down. If you are restoring after a break-in, the timeline decides which backup is clean – see the checklist for a hacked WordPress site.

Monitoring

Updates without monitoring are guesswork. The minimum is an uptime check every five minutes, a weekly mail listing pending updates, and an alert when the site’s e-mail stops working. The last one sounds excessive, but for us PHP’s mail() had stopped working on a server without a single error.

Questions about updates and backups

Should I enable automatic updates for every plugin?

No. Enable them for small, low-risk plugins and handle payments, shipping, forms and the page builder manually after a test. WordPress updates minor core versions by itself.

How often should WordPress be backed up?

Daily for a shop or a site with forms, weekly for a site that rarely changes. Keep at least 30 days, and test a restore every quarter.

How do I back up the WordPress database?

With wp db export backup.sql in the site’s root folder, or with your host’s tool. Keep a copy away from the server.

What do I do if an update breaks the site?

Install the plugin’s previous version with wp plugin install <slug> --version=<previous> --force, or restore the backup taken before the update. That is why the script above backs up first.

Sources

Last reviewed: 2026-12-04

Fixed price, no commitment

Get a free WordPress check

Tell us briefly what you use today and what you want to achieve. A person answers by e-mail with a proposal and a fixed price before any work starts.

  • A fixed price before we start
  • An answer by e-mail, no calls
  • Your details are used only to answer you

Fields marked with * are required.

What is it about?