Skip to content

WP-CLI Command Reference

All commands are registered under wp universal-storage when the plugin is active and WP-CLI is available.

Terminal window
wp universal-storage status # totals: offloaded/pending/failed/verified
wp universal-storage test # connection test (client, bucket, upload, HEAD, delete)
wp universal-storage migrate --dry-run
wp universal-storage migrate --batch-size=100
wp universal-storage migrate --attachment-id=123 --verbose
wp universal-storage migrate --delete-local
wp universal-storage verify
wp universal-storage retry_failed
wp universal-storage restore
wp universal-storage health scan --full
wp universal-storage health orphan # Pro
wp universal-storage repair --dry-run
wp universal-storage storage_migrate --source-profile=1 --dest-profile=2 --dry-run # Pro
wp universal-storage adopt # inventory pre-existing offloaded media (HEAD-only, never re-uploads)
wp universal-storage queue status

Commands marked # Pro require the KAZCODE Universal Storage Pro add-on active; without it they exit with a clear error rather than a raw PHP exception.

Docker Compose example

Terminal window
docker compose exec -T php wp universal-storage test
docker compose exec -T php wp universal-storage migrate --dry-run --batch-size=20

Notes

  • adopt is for pre-existing offloaded attachments — for example, media that was already uploaded to your bucket by some other means before this plugin managed it. It only does HEAD checks to build its inventory; it never re-uploads.
  • migrate --delete-local deletes the local copy only after that file’s remote upload is verified — the plugin’s local-deletion safety check applies here exactly as it does everywhere else in the plugin.