
In this article
A good backup is the difference between a bad afternoon and losing your website for good. Hacks, failed updates, deleted files, expired hosting and plain human error all happen sooner or later. When they do, a recent backup that you know how to restore gets you back online in minutes.
This guide works on any platform, whether your site runs on WordPress, Shopify, Wix, Joomla, Magento or custom code. Where a hosted builder makes backups for you, the same questions still apply: how recent is the copy, where is it kept and have you ever restored from it?
What a complete backup includes
- Files: your theme or templates, plugins or extensions, uploaded images and documents, and configuration files.
- Database: posts, pages, products, orders, users and settings. On most dynamic sites this is the part you cannot rebuild.
- Email and DNS settings: write down your DNS records, including SPF, DKIM and DMARC, so you can restore them if a domain move goes wrong.
- Keys and certificates: store licence keys and API keys in a password manager, not in the backup itself.
A files-only or database-only copy is a half backup. Many failed restores come from having just one of the two.
Step 1: decide how often to back up
Ask how much work you could afford to lose. A brochure site that changes monthly is fine with a weekly copy. A shop that takes orders every hour needs the database backed up daily or even hourly. Also take a manual backup right before any major change, such as an update, a redesign or a plugin install.
Step 2: follow the 3-2-1 rule
- 3 copies of your data: the live site and two backups.
- 2 different places: for example your host's backup and a separate cloud storage account.
- 1 copy off the server. If a hacker or a hosting failure takes the site, backups stored on the same server go with it.
Protect backup storage with a strong, unique password and two-factor login, and never leave backup archives in a public web folder. A forgotten backup.zip in your site root can be downloaded by anyone, and it often contains your database and passwords.
Step 3: pick a backup method
1. Your host's automatic backups
Many hosts include daily copies. Check how many days they keep, whether they include the database and how you restore. Treat them as one copy, not your only copy.
2. A backup plugin or extension
Most platforms have one that can schedule full backups and send them to cloud storage. Set it up to send copies off the server automatically.
3. Manual backups
Download the site files over SFTP and export the database from your control panel. It takes longer, but it needs no extra software and is a good habit before big changes.
4. Hosted builders
Shopify, Wix and Squarespace look after their own servers, yet you still own your content. Export products, customers, pages and blog posts regularly, and keep a copy of your theme customisations.
Step 4: test a restore
An untested backup is only a hope. At least twice a year, restore a copy to a test location, such as a staging site or a local setup, and check that pages load, images show, forms work and you can log in. Write down the steps and how long it took, so you are not working them out during an emergency.
Step 5: keep backups clean
If you restore a copy that already contains malware, you bring the problem back. After a hack, restore from a backup taken before the infection, then update everything and change every password. If you are not sure when the problem began, run a malware check on the restored site, and read how to check if your website is hacked.
A quick restore checklist
- Confirm the problem and note the time it started.
- Pick the newest backup from before that time.
- Restore the files and the database together.
- Update software, change passwords and remove unknown admin users.
- Check the SSL certificate, key pages and forms, then re-scan the site.
Common questions
How many backups should I keep?
Keep several generations, for example the last seven daily copies and a few monthly ones. Problems are often noticed days later, so only keeping last night's copy is risky.
Is my host's backup enough?
Not by itself. If your hosting account is closed, hacked or suspended, its backups can disappear with it. Keep one copy somewhere else.
Will a backup protect me from hackers?
It does not stop an attack, but it makes recovery fast. Pair it with updates, strong passwords and regular scans.
How do I know my backup works?
Restore it to a test site and check the pages. That is the only way to be sure.
Free tools for this problem
- Website malware scanner: Spam links, malicious scripts, cloaking, bad redirects and exposed backups.
- SSL certificate checker: Expiry date, issuer, chain, TLS versions, HTTPS redirect and HSTS.
- SPF, DKIM and DMARC checker: Check SPF, DKIM, DMARC and MX records so your email reaches the inbox.
