All-in-One WP Migration Box Extension includes integration with WP-CLI, allowing you to run migrations from the command line. It adds the backup and restores commands which can be run from the CLI.
Backup
Creates a new backup file.
Example: wp ai1wm box backup
OPTION | DESCRIPTION | EXAMPLE |
---|---|---|
[--sites] | Create a new backup file for WP Multisite ( Sub-Sites/Subdomain-Sites ) | wp ai1wm box backup --sites |
[--exclude-spam-comments] | Creates a backup file without spam comments | wp ai1wm box backup--exclude-spam-comments |
[--exclude-post-revisions] | Creates a backup file without post revisions | wp ai1wm box backup --exclude-post-revisions |
[--exclude-media] | Creates a backup file without media library files | wp ai1wm box backup --exclude-media |
[--exclude-themes] | Creates a backup file without any themes. | wp ai1wm box backup --exclude-themes |
[--exclude-inactive-themes] | Creates a backup file without currently inactive themes. | wp ai1wm box backup --exclude-inactive-themes |
[--exclude-muplugins] | Creates a backup file without must-use plugins. | wp ai1wm box backup --exclude-muplugins |
[--exclude-plugins] | Creates a backup file without plugins. | wp ai1wm box backup --exclude-plugins |
[--exclude-inactive-plugins] | Creates a backup file without currently inactive plugins. | wp ai1wm box backup --exclude-inactive-plugins |
[--exclude-cache] | Creates a backup file without cache files. | wp ai1wm box backup --exclude-cache |
[--exclude-database] | Creates a backup file without the database. | wp ai1wm box backup --exclude-database |
[--exclude-email-replace] | Creates a backup file without replacing email domain. | wp ai1wm box backup --exclude-email-replace |
[--replace "find" "replace"] | Finds and replaces text in the database. Use --replace flag before each pair for replacement. | wp ai1wm box backup --replace "wordpress" "WordPress" |
SIMULTANEOUS USE | All options be used simultaneously except --list can. Replace option could be used between other options. | wp ai1wm box backup --exclude-inactive-themes --replace "find" "replace" --exclude-cache --replace "old text" "new text" |
List backups
List backup files from box
Example: wp ai1wm box list-backups
OPTION | DESCRIPTION | EXAMPLE |
---|---|---|
[--folder-path= | List backups in a specific folder (folder name is specified in the extension settings). | wp ai1wm box list-backups --folder-path=my\ backup/migration |
Restore backup
Restore a backup from box.
Example: wp ai1wm box restore migration-wp-20170913-995743-931.wpress
OPTION | DESCRIPTION | EXAMPLE |
---|---|---|
[--folder-path= | Download a backup from a specific folder inside a cloud storage. (folder name is specified in the extension settings). | wp ai1wm box restore migration-wp-20170913-995743-939.wpress --folder-path=my\ backup/migration |
[--yes] | auto-confirm the backup on restore | wp ai1wm box restore migration-wp-20170913-995743-939.wpress --yes |
Retention settings
To keep the most recent backup: wp option update ai1wmbe_box_backups 1
To limit the size of backup :wp option update ai1wmbe_box_total 1GB
Note: You could change the numbers of recent backup and size of backup, as far your requirements