BACKUPS
June 24, 2026

How to Back Up a WordPress Site Automatically

9 min read
Author
CloudStick Team
WordPress Engineer
Share this article
Back Up WordPress Automatically
CloudStick
WordPress Auto-Backup

What a Complete WordPress Backup Includes

A WordPress backup is only complete when it covers two components: the database and the files. Neither is useful without the other. The database holds every post, page, option, user, and comment. The files hold the theme, plugins, and uploaded media.

Files: WordPress core, wp-content/themes, wp-content/plugins, wp-content/uploads, wp-config.php. Database: the single MySQL database containing all posts, settings, and user data.

The most common mistake is backing up only the database and forgetting about wp-content/uploads, which can be gigabytes of media files that are never included in a plain database export.

Plugin-Based Automated Backups

For non-technical users or shared hosting environments, WordPress plugins handle backup scheduling directly from wp-admin. The main options:

  • UpdraftPlus — most popular, free tier supports S3/Google Drive/Dropbox destinations, configurable schedule per component
  • BackupBuddy — premium, includes migration tools and scheduled offsite transfer
  • Duplicator Pro — primarily a migration tool, but also handles scheduled backups to cloud storage

Plugin backups have one important limitation: they rely on WP-Cron, which only fires when someone visits the site. A low-traffic site may miss scheduled backups for days. For production sites, combine plugin-based backups with server-level scheduling.

Server-Level Backup Without Plugins

On a VPS, you can back up WordPress directly from the command line without any plugin involved — more reliable and faster for large sites:

#!/bin/bash
SITE="example.com"
WP_ROOT="/var/www/$SITE"
DB_NAME="wp_example"
DB_USER="wp_user"
DB_PASS="db_password"
DEST="/backups/$SITE/$(date +%Y-%m-%d)"
mkdir -p "$DEST"
# Dump database
mysqldump -u"$DB_USER" -p"$DB_PASS" "$DB_NAME" \
--single-transaction --quick \
| gzip > "$DEST/$DB_NAME.sql.gz"
# Archive site files (exclude cache)
tar -czf "$DEST/files.tar.gz" \
--exclude="$WP_ROOT/wp-content/cache" \
"$WP_ROOT"

The --single-transaction flag on mysqldump ensures a consistent snapshot without locking the database — critical for live sites. The --exclude flag skips the cache directory, which can be large and is always regeneratable.

What Backup Schedule Is Right for WordPress?

Backup frequency should match how often your data changes:

  • Static brochure site (no new posts, no users) — weekly database + daily files is sufficient
  • Active blog (new posts daily) — daily database backup; files can be weekly since posts live in the DB
  • WooCommerce store (new orders constantly) — hourly database backup; customer orders that are lost between daily backups represent real financial loss
  • Membership/LMS site — hourly database, daily files; user progress is in the database

CloudStick Automates WordPress Backups from the Dashboard

CloudStick's Backups section handles both website files and database backups from a single dashboard view — no SSH required, no cron to configure, no scripts to write. Enable backup per-website or per-database, choose your schedule and retention period, and CloudStick stores the archives in its managed backup storage.

See the CloudStick knowledge base: How to Enable Database Backup for step-by-step instructions on enabling database backup for each WordPress site from the CloudStick dashboard.

Leave a comment
Full Name
Email Address
Message
Contents

We use cookies to improve your experience

CloudStick uses cookies to personalise content, analyse traffic and keep you signed in. Cookie Policy · Terms of Service

Manage cookies