Quick answer: A complete WordPress backup is the database plus wp-content. Dump the database with wp-cli or mysqldump, then push both to remote storage — a Cloud2Y Storage VPS over rsync is a simple, reliable target. Automate it nightly with cron.

Overview

Plugins can back up WordPress, but a few lines of shell do it with less overhead and no lock-in — and the copy lands off the web server, which is the whole point. Keep the site backup where a hacked site cannot delete it.

Before you start

  • SSH access to the WordPress server and a remote target (Storage VPS) with key auth.
  • wp-cli installed (optional but convenient): wp --info to verify.
  • Knowing your paths: WordPress root (e.g. /var/www/example.com) and its database name.

Step-by-step guide

  1. Dump the database:
    cd /var/www/example.com
    wp db export /var/backups/example-$(date +%F).sql --allow-root
    gzip /var/backups/example-$(date +%F).sql
    (or mysqldump example_db | gzip > /var/backups/example-$(date +%F).sql.gz)
  2. Sync files — themes, plugins, uploads:
    rsync -az --exclude 'cache/' /var/www/example.com/wp-content/ \
      [email protected]:/srv/backups/example/wp-content/
  3. Sync the database dumps:
    rsync -az /var/backups/ [email protected]:/srv/backups/example/db/
  4. Wrap steps 1–3 in a script and schedule with cron, e.g. nightly at 02:45.
  5. Once a month, do a test restore on a scratch site — a backup you have never restored is a hope, not a plan (see testing integrity).

Common issues

  • Files without the database (or vice versa): WordPress needs both halves from the same night to restore cleanly.
  • Backups stored on the same server: a full disk, a hack or a botched update takes the site and its backups — keep copies remote.
  • Huge uploads folder: exclude regenerable thumbnails or archive old years separately if transfers get slow.

When to contact support

WordPress-level work is in your hands on an unmanaged VPS; for platform problems during transfers or Storage VPS issues, open a ticket. Cloud2Y also offers a guide to WordPress backup plugins if you prefer that route.

Frequently asked questions

What exactly must be in a WordPress backup?

Two halves from the same moment: the database (posts, orders, settings) and the wp-content directory (themes, plugins, uploads). Restores only work cleanly with a matching pair.

Are backup plugins or shell scripts better?

Both work. Plugins are convenient inside wp-admin; a wp-cli plus rsync script is lighter, easier to automate with cron and keeps copies off the web server where a hack cannot reach them.

How often should a WooCommerce store be backed up?

Orders arrive continuously, so dump the database at least hourly and sync files nightly. Losing a day of orders usually costs far more than the extra storage ever will.

Related articles

Need reliable space for your backups? Order a Storage VPS at Cloud2Y →

Was this answer helpful? 0 Users Found This Useful (0 Votes)