CompareHostingOnline

Home / Guides / Website backups: what to back up, how often and how to test a restore

Guide

Website backups: what to back up, how often and how to test a restore

The 3-2-1 backup rule for websites, what files and databases to include, how often to back up and a safe way to test a restore.

By Muhammad Hamza, Founder & EditorUpdated Nov 30, 2026
Old hostNew host Then point DNS

Short answer

Back up the files and the database, keep at least one copy away from your host, and test a restore. Hosts often include daily backups, but you should not rely on one copy you do not control.

Last verified Nov 28, 2026 · How we test
At a glance
  • Why do websites need backups?Sites are lost in ordinary ways: a bad update breaks the layout, a plugin has a vulnerability, a hacked account is used to…
  • What should a website backup include?Site files: themes, plugins, uploads, configuration and any custom code.
  • What is the 3-2-1 rule?Keep three copies of your data, on two different kinds of storage, with one copy off-site.

Why do websites need backups?

Sites are lost in ordinary ways: a bad update breaks the layout, a plugin has a vulnerability, a hacked account is used to delete files, a mistake overwrites the database, or the host has a failure. A backup turns each of these from a disaster into an afternoon of work. Without one, there may be no way back.

It also makes everything else easier. Before a PHP upgrade, a migration or a big edit, a fresh backup means you can try the change without fear. Our website migration checklist and PHP versions guide both start with one.

What should a website backup include?

  • Site files: themes, plugins, uploads, configuration and any custom code.
  • The database: posts, pages, orders, users and settings. For many sites this is the most valuable part.
  • Email, if mailboxes live on the same account; see moving email to a new host.
  • DNS records and a list of installed plugins and versions, so you can rebuild if needed.
  • Server configuration on a VPS, such as web server settings and cron jobs.

What is the 3-2-1 rule?

Keep three copies of your data, on two different kinds of storage, with one copy off-site. For a website that means the live site, a backup on your host, and a copy in separate storage that you control, for example cloud object storage or your own computer. If the host account is compromised or deleted, the off-site copy survives.

CopyWhereProtects against
Live siteYour hostNothing, it is the original
Host backupSame provider, other storageBad updates, accidental deletion
Off-site copySeparate provider or your own storageHost failure, account loss, ransomware

How often should you back up?

Match the frequency to how much work you can afford to lose. A brochure site that changes monthly is fine with weekly backups. A blog with daily posts needs daily backups. A shop that takes orders all day should back up the database several times a day or use continuous, point-in-time backup, and always before updates. Keep several generations, for example daily for a week and weekly for a month, so you can go back to before a problem began, because some problems are noticed late.

What are the ways to take backups?

The WordPress developer documentation describes the files and database that make up a WordPress backup and the options for creating one.

MethodGoodLimits
Host backupsAutomatic and convenientOften same account; retention varies; check restore options
Control panel backupFull account in one fileManual unless scheduled
Plugin (WordPress)Schedules to remote storageNeeds maintenance and resources
Snapshots (VPS or cloud)Fast whole-server imageUsually stored with the provider
Scripts and rsyncFlexible and cheapYou must write and monitor them

How do you test a restore?

A backup you have never restored is a hope, not a backup. Schedule a restore test a few times a year.

  1. Pick a backup

    Choose one at random, not only the latest.

  2. Restore to staging

    Never test on the live site; see what a staging site is.

  3. Check the site

    Pages, images, forms, logins and checkout should work.

  4. Time it

    Note how long the restore took, so you know your recovery time.

What are the most common backup mistakes?

  • Keeping backups only on the same server as the site.
  • Backing up files but not the database, or the other way round.
  • Never testing a restore.
  • Storing backups unencrypted in a place others can reach.
  • Assuming the host backs up everything, forever. Read the terms: retention and restore fees vary; see hosting money-back guarantees for how to read provider terms.

What should you look for in a host’s backup features?

Ask how often backups run, how long they are kept, whether you can restore a single file or table without a support ticket, and whether backups are stored apart from your account. Managed WordPress hosts usually include daily backups and one-click restores; budget shared plans often charge for them. Compare this on our best web hosting list and ask support before you buy.

A worked example: recovering from a bad update

A site owner updates a major plugin on a Friday evening. The checkout page now shows an error. They have daily backups from the host and a weekly off-site copy. They open the host’s backup tool, choose the backup from that morning and restore only the plugin folder and the database to a staging copy first. The restore works, so they apply it to the live site and the checkout returns. Total downtime: about twenty minutes. The owner then reports the bug to the plugin’s developer and delays the update until a fix is released.

Without the backup they would have faced hours of debugging with customers unable to pay. The backup turned a crisis into a small inconvenience.

What should a written backup plan say?

ItemExample
What is backed upFiles, database, email, DNS record list
How oftenDatabase daily, files weekly, extra before updates
Where it is storedHost copy plus off-site storage
How long it is keptDaily for 7 days, weekly for 4 weeks
Who checks itA named person, monthly
How restores are testedOn staging, quarterly

Sources and further reading

Common questions

How often should I back up my website?

Match it to how much you can afford to lose. A monthly-updated brochure site can use weekly backups, a blog daily, and a shop several database backups a day plus one before every update. Keep several generations so you can go back further.

What should a website backup include?

The site files (themes, plugins, uploads, configuration) and the database, plus email if it lives on the account and a record of your DNS settings. A backup missing the database is usually useless for a dynamic site.

Is my hosting company's backup enough?

It helps but is not enough alone. Host backups can fail, be deleted with the account or have short retention. Keep at least one copy elsewhere that you control, and check that you can restore without paying for it.

Where should I store backups?

Away from the server they protect, ideally in different storage and a different provider, such as cloud object storage or your own computer. Encrypt anything sensitive and restrict access so a compromise of one place does not expose all copies.

How do I test a website restore?

Restore a backup to a staging site, not the live one, and click through pages, forms, logins and checkout. Time the restore. Do this a few times a year, because a backup that has never been restored may not work.

Related

More guides

Esc

Use the arrow keys, then Enter.