WP Manifestindependent plugin directory
manifest / updates / sw-backupit

SW-BackupIt

Robust, resumable WordPress backup, restore and disaster recovery with a standalone restore application.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/sw-wordpress/sw-backupit/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Backs up the complete WordPress site (files and database) and restores it, also on another domain or server. Restores run in a standalone application that works even when WordPress itself is broken.

Features

  • Resumable backups — Large sites are backed up in short steps that continue after interruptions, also on shared hosting.
  • Full, incremental and differential — Profiles decide what is backed up, how often and how long it is kept.
  • Several storage targets — Local directory, SFTP and S3-compatible storage, each copy verified.
  • Encryption — Optional client-side encryption with libsodium before a backup leaves the server.
  • Standalone restore — Web wizard or command line, with selective restore and domain migration.
  • Restore tests and audit log — Backups are checked regularly; downloads, deletions and restores are logged.

Languages

English, German, French, Italian, Polish.

Usage

  1. Open sw-backupit → Dashboard (on multisite in the Network Admin) and fix any warnings shown there.
  2. Optional: under Storage targets click Add storage target, then Test connection, and add the target to a profile under Profiles.
  3. Under Profiles click Run now on Full backup (everything, without cache). From the command line: wp sw-backupit backup create --profile="Full backup (everything, without cache)"
  4. Under Schedules click Create schedule to run backups automatically.
  5. To restore, open a backup under Backups, click Restore, then Prepare restore and Open standalone restore.

Full guide: docs/user-guide.md, commands: docs/wp-cli.md.

Configuration

Requirements

PHP 8.2+ with zip, zlib, pdo_mysql (and sodium for encryption), WordPress 6.4+, MySQL or MariaDB, single site or multisite (network wide).

Settings

Options are under sw-backupit → Settings (staging directory, Cron mode, Encryption keys, Backup before updates, notifications, logging). Keep the staging directory outside the web root.

The plugin reads these wp-config.php constants:

// Encryption key for key ID <ID> (upper-cased, other characters become "_"). Default: not set,
// the key stored under Settings → Encryption keys is used. Recommended: keep keys outside the database.
// Value: the secret shown once on creation ("base64:…") or a passphrase. Also read from the environment.
define( 'SWBACKUPIT_KEY_<ID>', 'base64:…' );

// Tests only: path to an alternative autoloader. Default: not set.
define( 'SWBACKUPIT_AUTOLOADER', '/path/to/autoload.php' );

Background tasks

WP-Cron checks schedules every minute, runs backup jobs, restarts stuck jobs and once a day cleans up old logs and restore wizards, verifies stored backups and runs due restore tests. On sites with little traffic or with DISABLE_WP_CRON, set Cron mode to System cron (recommended) and run every minute, e.g. * * * * * wp sw-backupit schedule run-due --path=/path/to/wordpress.

Integrations

Deactivation and removal

Deactivating stops all background tasks and removes prepared restore wizards; profiles, settings and backups are kept. Deleting the plugin does the same and removes tables, settings, keys and capabilities only if the setting delete_data_on_uninstall is enabled (default: off, not shown in the admin UI). Backups in the staging directory and on storage targets are never deleted. On multisite all data is network wide.

Troubleshooting

Problem Solution
Scheduled backups do not start. Check the cron notice on the dashboard and use a system cron (see above).
A backup seems stuck. Wait about a minute: the watchdog restarts lost jobs. Failed jobs can be retried from the job log.
The staging directory is refused or reported as public. Choose a directory outside the web root; on nginx add a deny rule, see docs/user-guide.md.
An encrypted backup cannot be read. Provide the key (--key, SWBI_KEY or SWBACKUPIT_KEY_<ID>). Without the key no restore is possible.
Restore reports a missing base backup. Download the whole chain (fetch --with-chain) into the same directory.

Built with AI

This plugin was implemented with AI assistance. Why it exists and how AI is used: sw-wordpress manifest.

AI agents must follow the project rules before changing code:

Development

Requirements: PHP 8.2+, Composer, Node.js 22.13+ (22/24 LTS or 26+) with npm, Make, and Docker for the release build.

composer install
make build                           # admin UI (Vue/Quasar) into assets/admin
bin/test-db.sh start                 # private MariaDB for integration tests
(cd tests/wp && composer install)    # WordPress test environment

composer check                       # coding standards, PHPStan, unit + integration tests
composer test:e2e && composer test:wp && composer test:wp:ms
(cd apps/admin && npm run typecheck && npm run lint && npm run test)

bin/build-zip.sh                     # release ZIP in dist/

Every change needs tests; line coverage must stay above 80 % for PHP and JavaScript. Test setup, release build and SonarQube: docs/development.md, translations: docs/translations.md. GitHub Actions run the checks on every push.

License

GPL-2.0-or-later — see LICENSE. Provided by Stefan Warnat.

Bundled third-party components. PHP libraries (license texts in each package directory under vendor/ after composer install; the release build ships them prefixed in vendor-prefixed/):

Admin UI bundle in assets/admin/ (license headers in app.js, full texts in apps/admin/node_modules/ of the source):