Install
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.zipBacks 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
- Open sw-backupit → Dashboard (on multisite in the Network Admin) and fix any warnings shown there.
- Optional: under Storage targets click Add storage target, then Test connection, and add the target to a profile under Profiles.
- 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)" - Under Schedules click Create schedule to run backups automatically.
- 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
- WP-CLI — All backup, restore, schedule and storage functions: docs/wp-cli.md.
- REST API and hooks — For own integrations: docs/rest-api.md, docs/hooks.md.
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:
- Rules and mandatory coverage: AGENTS.md, CODE-STYLE.md, CONTRIBUTING.md
- Product spec: PLAN.md, current status: TODO.md, DONE.md
- Architecture, format and security: docs/ (architecture.md, backup-format.md, security.md)
- README structure: README-STANDARD.md
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/):
- aws/aws-sdk-php, aws/aws-crt-php — Apache-2.0
- league/flysystem with flysystem-local, flysystem-sftp-v3, flysystem-aws-s3-v3, mime-type-detection — MIT
- phpseclib/phpseclib, paragonie/constant_time_encoding, paragonie/random_compat — MIT
- maennchen/zipstream-php, dragonmantank/cron-expression, mtdowling/jmespath.php — MIT
- guzzlehttp/guzzle, guzzlehttp/promises, guzzlehttp/psr7 — MIT
- psr/log (also in the standalone restore app), psr/http-client, psr/http-factory, psr/http-message — MIT
- symfony/filesystem, deprecation-contracts, polyfill-ctype, polyfill-mbstring, polyfill-php80, polyfill-php82 — MIT
Admin UI bundle in assets/admin/ (license headers in app.js, full texts in apps/admin/node_modules/ of the source):
- Vue, Vue Router, Pinia, Vue I18n — MIT
- Quasar, @quasar/extras — MIT
- Material Icons Round font — Apache-2.0
- Inter, JetBrains Mono fonts (via Fontsource) — OFL-1.1