Restora WP-CLI commands: backup, list, restore, delete, log, status
Every wp restora subcommand with every option and its default, examples for scripts and monitoring, the exit codes, how to pass the password of an encrypted backup safely, the Pro-only --site option for networks, and how to switch the commands off.

Everything the Restora screen does is available from the terminal as wp restora, for scripts, for sites managed over SSH and for monitoring. The commands drive the same engine as the screen: a backup runs slice after slice in the shell process, a restore runs the restore engine in the shell process, and both print their progress. wp help restora prints the built-in help.
wp restora backup
Makes a backup now and waits for it to finish.
| Option | Default | Meaning |
|---|---|---|
--type=<type> | full | What to back up: full, files or db. |
--parts=<parts> | Exactly which parts, comma-separated, instead of --type: core, plugins, themes, uploads, db. | |
--separate | off | Save each part as its own file instead of one archive (one set, like “Separate files” on the screen). |
--site=<id> | On a multisite network (Restora Pro): the id of the site to back up, or all for one backup per site, as a set. | |
--quiet-progress | off | Print only the result, not the progress. |
wp restora backup
wp restora backup --type=db
wp restora backup --parts=plugins,themes --separate
wp restora backup --site=all
On success: “Success: Backup complete: restora-full-20261029-030000-6775986026f8.zip”. A backup with unreadable files ends with a warning line first. On a network without Pro, --site answers “Error: No site with that id on this network, or Restora Pro is not active (backing up the sites of a network needs it).” A backup made this way is listed with the source “Command line”, and, like manual ones, is never deleted by retention.
wp restora list
Lists the backups on this server, newest first.
| Option | Default | Meaning |
|---|---|---|
--format=<format> | table | table, csv, json, yaml, count or ids (the file names, space-separated). |
The table shows name, created, type, files, tables, size, took, source and encrypted (empty, “key” or “password”); on a network a site column too. json, csv and yaml also include the set a separate-files backup belongs to.
wp restora list
wp restora list --format=json
wp restora list --format=ids
wp restora restore <name>
Restores a backup over this site and waits for it to finish. The backup is checked from start to finish before anything is changed; wp-config.php is never overwritten.
| Option | Default | Meaning |
|---|---|---|
<name> | required | The backup's file name, as wp restora list shows it. |
--db | Restore the database. With neither --db nor --files, both are restored. | |
--files | Restore the files. | |
--password=<password> | The password of an encrypted backup, or the private key (RESTORA-SK1-…) of one locked with a key pair. Better: the RESTORA_PASSWORD environment variable, so it stays out of the shell history. | |
--skip-safety | off | Do not save a backup of the site as it is now before restoring. |
--yes | off | Do not ask for confirmation (“The current site will be replaced by this backup. Continue?”). |
--quiet-progress | off | Print only the result, not the progress. |
wp restora restore restora-full-20261018-082834-6775986026f8.zip --yes
RESTORA_PASSWORD=… wp restora restore restora-db-….zip --db --skip-safety --yes
Without --skip-safety the command first prints “Saving the site as it is now…” and makes a safety backup of the same scope; if that fails, nothing is restored: “The safety backup failed, so nothing was restored.” At the end: “Success: Restore complete. If the site asks you to log in again, that is normal: the restored database has its own logins.”
wp restora delete <name>...
Deletes one or more backups permanently, with their side files. --yes skips the confirmation (“Delete 2 backups permanently?”). Each name is reported as “Deleted …” or “Could not delete …”; if any failed, the exit code is 1.
wp restora log <name>
Prints the log of the job that made a backup (the last 256 KB if it is very long). “There is no log for this backup.” when none was kept, for instance for an archive copied in by hand.
wp restora status
Shows the schedule, the newest backup and the last scheduled result; exit code 1 when something needs attention. --format takes table (default), json or yaml. The rows are full_schedule, db_schedule, newest_backup, last_scheduled (status, time and the error if any), running_job (type and percentage), health (the Site Health result, for example “good: Your site is backed up regularly”), and one problem_N row per reason the server cannot back up or restore. The exit code follows the Site Health check: 0 for “good”, 1 for “recommended” or “critical”, so a monitoring job can simply run it:
wp restora status --format=json || mail -s "Backups need attention" [email protected]
Exit codes
- 0: the command completed.
- 1: any failure (“Error: Backup failed: …”, “Error: Restore failed: …”, “Error: Backup not found.”, “Error: Cancelled.”), a delete that could not remove every backup, and
statuswhen the backups need attention.
Who can run them, and switching them off
The commands run for whoever has shell access to the server as the site's own user, who could reach the files anyway; WordPress capabilities are not involved. On a server whose shell is shared, define( 'RESTORA_DISABLE_CLI', true ); in wp-config.php switches them off. Pro's WP-CLI additions (the --site option) need an active licence on the site.