- 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.
| Copy | Where | Protects against |
|---|---|---|
| Live site | Your host | Nothing, it is the original |
| Host backup | Same provider, other storage | Bad updates, accidental deletion |
| Off-site copy | Separate provider or your own storage | Host 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.
| Method | Good | Limits |
|---|---|---|
| Host backups | Automatic and convenient | Often same account; retention varies; check restore options |
| Control panel backup | Full account in one file | Manual unless scheduled |
| Plugin (WordPress) | Schedules to remote storage | Needs maintenance and resources |
| Snapshots (VPS or cloud) | Fast whole-server image | Usually stored with the provider |
| Scripts and rsync | Flexible and cheap | You 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.
- Pick a backup
Choose one at random, not only the latest.
- Restore to staging
Never test on the live site; see what a staging site is.
- Check the site
Pages, images, forms, logins and checkout should work.
- 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?
| Item | Example |
|---|---|
| What is backed up | Files, database, email, DNS record list |
| How often | Database daily, files weekly, extra before updates |
| Where it is stored | Host copy plus off-site storage |
| How long it is kept | Daily for 7 days, weekly for 4 weeks |
| Who checks it | A named person, monthly |
| How restores are tested | On staging, quarterly |