Testing that a backup actually restores
Until you've restored it, a backup is a hope. The NCSC says backups should be regularly tested to check they work as expected.1 CISA says to test the backup procedure so your team can rapidly restore data, both fully and partially.2
A test is the only way to find out you saved the database but not the files, or the reverse.
Test somewhere that isn't the live site
Restoring over your live site to see what happens is a gamble. Use a spare location instead: a second, empty site on your host, a staging copy if your host offers one, or a copy on your own computer.
The WordPress handbook has a chapter on running a development copy of WordPress, which is a good place to look for how.3 Steps depend on your platform, so use its own documentation.
What to check
After the test restore, open the copy and look at:
- The home page and a few inner pages.
- Images and uploaded files. Missing pictures often point to a files problem.
- Recent posts or entries. Missing content often points to an old or absent database.
- The login screen, and whether you can sign in.
- Forms, menus and anything else visitors use.
You're checking both halves. Files and the database explains why both matter.
Full and partial restores
CISA's wording covers both a full and a partial restore.2 Full means the whole site. Partial means one piece, such as a single deleted page or a folder of images. Try each once, because tools handle them differently.
| Test | Tells you |
|---|---|
| Full restore to a spare place | Both halves are present and match |
| Restore one file or folder | You can undo a small mistake without redoing everything |
| Restore from a downloaded copy | The copy you hold works, not only the host's |
The last row matters. If you only test the host's tool, you haven't tested your own copy. The host-versus-own comparison covers the difference.
Test the automatic ones too
Automatic backups can fail without a sound. The WordPress handbook says it's highly recommended to back up the automatic backups with a manual one once in a while, to guarantee the process is working.3 Look at the files themselves. Are they there, recent, and not empty?
Write it down
CISA says a backup plan is only helpful if everyone knows how to use it, and that you should write down your procedures.2 For a small site, that can be half a page:
- Where the backups are kept, and who can get to them.
- How to start a restore.
- The order: files, then database. The step-by-step restore page lists it.
- Who to call at the host.
- The date of the last test, and what you found.
Put a copy of those notes somewhere other than the site itself. If the site is down, you can't read instructions stored on it.
When to repeat it
The sources saved for this site don't name a testing interval, so there's no official number to quote. A reasonable habit is to test after you change host, change how backups are made, or make a big change to the site. Beyond that, pick a regular date and keep to it, as you would when setting a backup rhythm.
If a test fails, you've found the problem while it's cheap. Fix the backup method and test again.
Sources used
- Offline backups in an online world, National Cyber Security Centre (UK)
- Back Up Business Data, CISA (US Cybersecurity and Infrastructure Security Agency)
- Backups – Advanced Administration Handbook, WordPress Developer Resources