A website can be lost in a moment: by a failed update, a mistaken deletion, a hacked password, a host's hardware failure or the closure of the hosting company. A recent backup kept somewhere else turns each of these from a disaster into an inconvenience. Routine security measures make most of them less likely.
What can go wrong
- Human error: a file overwritten, a page deleted, a faulty change.
- Software updates that conflict with a theme or extension.
- Malicious intrusion, in which pages are defaced, spam is inserted or visitors are redirected.
- Ransomware and theft of data.
- Failure of the host's equipment, or of the host as a business.
- An expired domain name or hosting account.
What to back up
- Files: pages, themes, extensions, configuration and uploaded images and documents.
- The database, in which a content management system keeps pages, products, orders and users.
- Email stored on the server.
- DNS records and other settings, noted in a document.
- Log-ins for the host, registrar and site, kept in a password manager.
How often
The interval is set by how much work could acceptably be lost. A site of fixed pages is copied after each change. A blog is copied weekly, and a shop or booking system daily or more often, since orders arrive continuously. A copy is always taken before an update or redesign.
Where to keep copies
- A backup stored only on the same server as the site is lost with it.
- At least one copy is kept off the server: with a cloud storage service, on an office computer or on an external drive.
- Several generations are retained, such as daily copies for a week and weekly for a few months, because a fault may not be noticed at once.
- Backups containing personal data are encrypted and stored securely.
Methods
- The host's backups: convenient, but the terms are read; some hosts keep them only for their own recovery, or charge to restore.
- Control panel tools, which pack files and database for download.
- Backup extensions for content management systems, which run to a schedule and send copies to remote storage.
- Manual copies by secure file transfer and a database export.
- Website builders hold the site on their own systems; text and images are kept separately by the owner, since the site itself cannot usually be exported.
Testing
A backup that has never been restored is unproven. From time to time a copy is restored to a test location, and the result checked. The steps for restoring are written down, so that they can be followed under pressure.
Keeping software up to date
- Most intrusions exploit known flaws in outdated software. The content management system, themes and extensions are updated promptly, automatically where that is reliable.
- Unused themes and extensions are deleted, not merely switched off.
- Extensions are taken only from reputable sources, with recent updates and many users.
- The server's scripting language is kept at a supported version.
Access
- A strong, unique password for every account, with two-step verification; see passwords and online security.
- A separate log-in for each person, with the least permission needed, removed when they leave.
- The default administrator name changed, and failed log-in attempts limited.
- Files transferred by encrypted protocols only.
Encryption
A secure certificate encrypts the connection between visitor and site, shown by https and a padlock. It protects log-ins and forms, is expected by browsers, which mark other sites as not secure, and is taken into account by search engines. Certificates are available free through most hosts and renew automatically.
Further protection
- A web application firewall, offered by hosts and security services, filters malicious requests.
- Malware scanning and alerts for changed files.
- Protection against spam on forms and comments.
- Monitoring that sends a warning when the site is unreachable.
- Card payments taken through a payment provider's hosted page, so that card numbers never touch the site.
If the site is compromised
- The site is taken offline or placed in maintenance mode.
- All passwords are changed: host, database, site, file transfer and email.
- The host is told, and its logs are used to find the point of entry.
- A clean backup from before the intrusion is restored, or the files are cleaned by a specialist.
- All software is updated and the weakness closed.
- Search engines are asked to review the site if a warning has been attached to it.
Where personal data may have been exposed, the breach is assessed and, if it poses a risk to individuals, reported to the information regulator within 72 hours; see customer records and data protection. Fraud and cyber crime are reported to the national reporting centre.
A routine
- Weekly: updates applied, backups confirmed.
- Monthly: a look through user accounts and installed extensions.
- Twice a year: a test restore.
- Yearly: renewal dates for the domain, hosting and certificate checked.
General upkeep is covered under maintaining a website.