WP-CLI Commands for Managing WordPress Media in the Cloud
With Offloft installed, wp offloft manages your cloud media from the command line. Use status to see how it's doing, scan before moving anything, offload to upload and check files, verify to re-check them, and issues and fix to deal with problems. The commands are all in the free plugin.
Why use WP-CLI for this?
It suits large libraries, because you don't need a browser tab open. You can also run it from deploy scripts and cron, and it works on sites where the admin is slow. Agencies can use the same commands across many sites.
How do you check where things stand?
wp offloft status
wp offloft test-connectionstatus shows how your media is doing. test-connection runs the same five-step test as the admin screen.
How do you move a library?
wp offloft scan
wp offloft offloadscan uploads nothing: it reports what you have and what needs attention. offload uploads media items and checks each copy.
How do you handle running jobs?
wp offloft job list
wp offloft job pause
wp offloft job resume
wp offloft job cancelPause and cancel take effect after the media item in hand. When you cancel, what's done stays done.
Run wp help offloft job for the arguments each one takes.
How do you find and fix problems?
wp offloft verify
wp offloft issues
wp offloft fixverify checks that cloud copies are there and complete, with no download. issues lists what went wrong, what it affects and what fixes it. fix can fix one issue, every one of a kind, or all that Offloft can fix.
What else is there?
wp offloft excludeandincludekeep media items on your server, or offload them again.wp offloft restorebrings files missing from your server back from the cloud.wp offloft resyncsyncs media items again now.wp offloft runprocesses the background tasks that are due. It's handy where WP-Cron is off.wp offloft complete-setupfinishes setup without the wizard, for a connection set inwp-config.php.wp offloft system-infoshows system information for a support request, with keys masked.
The full list is in the WP-CLI reference.