Backup and Recovery

How to create regular backups of your website to prevent data loss.

Introduction

Website backups are like insurance for your online presence. They create a safety net that protects your content, design, and functionality from accidental deletion, hacking, server failures, or other disasters. This guide will walk you through the process of setting up a reliable backup system for your website, no matter what platform you're using.

What You'll Need

  • Access to your website's files (via FTP, control panel, or CMS)
  • Access to your website's database (if applicable)
  • Storage space for your backups (local drive, cloud storage, or hosting-provided storage)
  • Optional: A backup plugin or service, depending on your platform

Website Backup Basics

What Should Be Backed Up

A complete website backup includes:

  • Files: HTML, CSS, JavaScript, images, videos, PDFs, and other media
  • Database: Posts, pages, users, comments, product information, and other dynamic content
  • Configurations: Server settings, .htaccess files, robots.txt, etc.
  • Themes and plugins: For CMS sites like WordPress

Backup Frequency

How often you should back up depends on how frequently your site changes:

Website Type Recommended Backup Frequency
Static website (rarely changes) Monthly + after any updates
Blog or content site (weekly updates) Weekly
E-commerce or membership site Daily
High-traffic business site Daily or multiple times per day

Backup Storage Best Practices

Follow the 3-2-1 backup rule:

  • 3 copies of your data
  • 2 different types of media (e.g., cloud and local drives)
  • 1 copy stored off-site (in case of physical disaster)

Never Store Backups Only on Your Web Server

If your server fails or gets hacked, you could lose both your website and backups. Always download backups to a separate location.

Backup Methods by Platform

WordPress Website Backups

WordPress is the most popular CMS, and there are several ways to back it up:

Method 1: Using a Backup Plugin

This is the easiest option for most WordPress users:

  1. UpdraftPlus (Free and Premium versions)
    • Go to Plugins > Add New in your WordPress dashboard
    • Search for "UpdraftPlus"
    • Install and activate the plugin
    • Go to Settings > UpdraftPlus Backups
    • Click the "Backup Now" button for an immediate backup
    • Set up a backup schedule under the "Settings" tab
    • Configure remote storage options (Google Drive, Dropbox, etc.)
  2. BackupBuddy (Premium)
    • Purchase from iThemes
    • Upload and install the plugin
    • Configure backup settings and schedule
    • Set up remote storage (BackupBuddy Stash, Amazon S3, Dropbox, etc.)
  3. Jetpack Backup (Premium)
    • Install the Jetpack plugin
    • Purchase a Jetpack Backup plan
    • Activate real-time or daily backups
    • Backups are stored on Automattic's servers

WordPress Backup Plugin Features to Look For

- Separate database and file backups
- Automated scheduling
- Remote storage options
- One-click restore
- Migration capabilities (to move to a new host)
- Selective restores of individual files

Method 2: Using Your Hosting Provider

Many WordPress hosts offer built-in backup solutions:

  • SiteGround: Daily backups with easy restore through Site Tools
  • Bluehost: CodeGuard backup add-on or manual cPanel backups
  • WP Engine: Automated daily backups and restore points
  • Kinsta: Automatic daily backups with 14-day retention

Check your hosting provider's documentation or contact support to learn about their backup options.

Method 3: Manual WordPress Backups

For complete control, you can create manual backups:

  1. Backup WordPress Files
    • Connect to your server via FTP (use FileZilla or similar)
    • Download your entire WordPress directory (usually called "public_html" or "www")
    • Save to your local computer or external drive
  2. Backup WordPress Database
    • Log in to your hosting control panel
    • Find phpMyAdmin in the database section
    • Select your WordPress database
    • Click the "Export" tab
    • Choose "Quick" export method and SQL format
    • Click "Go" to download the database file

Wix, Squarespace, and Shopify Backups

Website builders handle backups differently:

Wix Backup Options

  • Site History: Wix automatically saves versions of your site as you edit
    • Go to Site > History
    • View and restore previous versions
    • Limited to site design, not dynamic content
  • Manual Content Export:
    • Blog posts: Blog > Dashboard > Posts > ⋮ > Export Posts
    • Products: Store > Products > ⋮ > Export Products
    • Content collection data: Content Manager > ⋮ > Export Collection

Squarespace Backup Options

  • Export your site:
    • Go to Settings > Advanced > Export
    • Choose WordPress format
    • Download the exported .xml file
    • Note: This won't include all design elements
  • Content exports:
    • Products: Commerce > Inventory > Export
    • Blog: Blog page > ⋮ > Export

Shopify Backup Options

  • Built-in backups: Shopify maintains platform-level backups
  • Theme backup: Go to Online Store > Themes > Actions > Download theme file
  • Product/customer export: Go to Products/Customers > Export
  • Apps: Third-party backup apps like "Rewind Backups" offer more comprehensive solutions

Website Builder Limitations

Most website builders don't offer complete site backup and restore functionality. For mission-critical sites, consider using a platform with more robust backup options.

HTML/CSS Website Backups

For traditional static websites:

  1. File Backup
    • Connect to your server via FTP
    • Download all website files and folders
    • Organize backups by date
  2. Database Backup (if applicable)
    • Use phpMyAdmin to export your database
    • Save the SQL file with your website files

Automated Backup Scripts

For advanced users, automated scripts can handle backups:

Linux Server Backup Script Example

#!/bin/bash
# Simple website backup script

# Set variables
SITE_NAME="yourwebsite"
BACKUP_DIR="/path/to/backups"
SITE_DIR="/path/to/website"
DB_NAME="your_database"
DB_USER="your_db_user"
DB_PASS="your_password"
DATE=$(date +"%Y-%m-%d")

# Create backup directory if it doesn't exist
mkdir -p "$BACKUP_DIR/$DATE"

# Backup files
tar -czf "$BACKUP_DIR/$DATE/$SITE_NAME-files.tar.gz" "$SITE_DIR"

# Backup database
mysqldump -u "$DB_USER" -p"$DB_PASS" "$DB_NAME" > "$BACKUP_DIR/$DATE/$SITE_NAME-db.sql"

# Delete backups older than 30 days
find "$BACKUP_DIR" -type d -mtime +30 -exec rm -rf {} \;

echo "Backup completed: $DATE"

This script can be scheduled to run automatically using cron jobs on Linux servers.

Using Cloud Storage for Backups

Cloud storage provides a reliable off-site location for your backups:

Popular Cloud Backup Destinations

  • Google Drive: 15GB free storage, easy to use, integrates with many backup plugins
  • Dropbox: 2GB free storage, automatic syncing, version history
  • Microsoft OneDrive: 5GB free storage, integrates well with Microsoft tools
  • Amazon S3: Pay-as-you-go storage, highly reliable, used by many backup services
  • Backblaze B2: Low-cost cloud storage specifically designed for backups

Setting Up Google Drive for Backups

  1. Create a folder in Google Drive specifically for website backups
  2. Organize backups by website name and date
  3. Manually upload backups, or
  4. Use a backup plugin that supports Google Drive (like UpdraftPlus for WordPress)

Email Backups

For very small websites, you can email backups to yourself as attachments. However, this isn't suitable for larger sites due to email attachment size limits.

Testing and Restoring Backups

Having backups is only useful if you can actually restore from them when needed.

How to Test Your Backups

  1. Schedule regular test restores (quarterly at minimum)
  2. Create a test environment (staging site or local development environment)
  3. Restore your backup to the test environment
  4. Verify functionality by checking pages, features, and content
  5. Document the restore process for future reference

Test Before You Need It

The worst time to discover your backup doesn't work is when you're trying to recover from a disaster. Test your backups regularly!

WordPress Backup Restoration

Using a Plugin

  1. Log in to your WordPress dashboard
  2. Go to your backup plugin's settings
  3. Find the "Restore" option
  4. Select the backup you want to restore
  5. Follow the plugin's restoration wizard

Manual WordPress Restoration

  1. Restore files:
    • Upload your backed-up files to the server via FTP
    • Ensure file permissions are set correctly
  2. Restore database:
    • Create a new database or empty the existing one
    • Import your SQL backup file using phpMyAdmin
    • Update the wp-config.php file if database details have changed

Website Builder Restoration

For platforms like Wix, Squarespace, and Shopify:

  • Wix: Use Site History to revert to a previous version
  • Squarespace: Import the WordPress export file or individual content exports
  • Shopify: Use the theme backup file to restore design or import product/customer CSVs

Partial Restorations

Sometimes you only need to restore specific files or database tables. Many backup plugins offer selective restoration options, which can be faster than a full site restore.

Creating a Comprehensive Backup Strategy

A complete backup strategy includes:

1. Backup Schedule

Create a calendar of when backups will occur:

  • Define full backup frequency (daily, weekly, monthly)
  • Set incremental backup timing (for frequently changing content)
  • Schedule backup tests and verification

2. Storage Plan

Determine where backups will be kept:

  • Primary storage location
  • Secondary (redundant) location
  • Off-site storage option
  • Retention policy (how long to keep old backups)

3. Documentation

Document your backup and recovery procedures:

  • Step-by-step backup instructions
  • Step-by-step restore instructions
  • Login credentials and access information (stored securely)
  • Contact information for hosting support

4. Responsible Parties

Assign backup responsibilities:

  • Who monitors backup completion
  • Who tests backups
  • Who performs restoration when needed
  • Backup notification recipients

Before Major Changes

Always create a manual backup before making significant changes to your website, such as updating themes, installing new plugins, or changing hosting providers.

Special Backup Considerations

E-commerce Website Backups

For online stores, consider these additional factors:

  • More frequent backups due to constantly changing order data
  • Special attention to customer data and GDPR/privacy compliance
  • Order database backups separate from product catalog
  • Payment gateway and integration configurations

Membership Site Backups

Sites with user accounts require:

  • Member database backup procedures
  • Consideration for user-generated content
  • Password security during backup/restore

Large Media Libraries

For websites with extensive image or video content:

  • Separate media backup schedules (less frequent if media rarely changes)
  • Consider incremental backups to save storage space
  • Use compression to reduce backup size

Next Steps

Now that you understand website backups, take these actions:

  1. Implement an immediate backup of your website today
  2. Set up an automated backup system based on your website platform
  3. Test a restore to ensure your backups actually work
  4. Create a backup calendar with scheduled tests and verifications
  5. Learn more about website security with our Website Security Basics guide

Need Help With Website Backups?

Contact us for personalized assistance with setting up a reliable backup system.

Get in Touch