S3-backed downloads: verify, inspect, regenerate links, offload, migrate back and purge orphans.
Namespacewp ias s3-storage
Slugias-s3-storage
Version 1.1.16
Tier Commercial (licence required)
Commands 11
Conventions on this page
Every command accepts --format=<json|table|csv|yaml>. Commands marked Write accept --dry-run (resolve, audit, write nothing) and --yes (skip the prompt). Commands marked Irreversible additionally prompt unless --yes is passed, and any bulk delete refuses to run without an explicit scope argument rather than defaulting to delete-all.
Reads back the entries the plugin records to its non-autoloaded ias_s3_audit_log option — the plugin-level admin action log (distinct from the suite-wide CLI audit log). Each entry carries a timestamp, the acting user, the action name, the client IP and an action-specific details blob. Newest first; filter to a single action with --action, page with --page/--per-page.
Options
Argument
Required
Type
Description
[--action=<action>]
no
flag (value)
Only entries for this action (e.g. settings_changed, license_activated, license_deactivated, file_uploaded, connection_tested, cache_cleared).
The plugin writes download events to the WooCommerce logger (source ias-s3-storage) when logging is enabled. This best-effort reader parses those log files; with logging off or no log files present it returns empty.
Options
Argument
Required
Type
Description
[--since=<date>]
no
flag (value)
Only lines on/after this date (anything strtotime understands).
[--customer=<customer>]
no
flag (value)
Substring-match log lines for this customer reference (email fragment).
Finds the product's first S3-backed download, downloads the object into the site's woocommerce_uploads directory, and repoints the product download at the local copy. The S3 object is NOT deleted — it remains in the bucket, but is no longer the source of truth, so the file is duplicated (local + S3). Use purge-orphans afterwards if you want to reclaim the now-unmapped object.
Options
Argument
Required
Type
Description
<product>
yes
positional
Product reference — numeric ID or SKU.
[--bucket=<b>]
no
flag (value)
Override the source bucket (defaults to the shortcode/option bucket).
[--dry-run]
no
flag
Report the object key, source bucket and planned local path without contacting S3.
[--yes]
no
flag
Skip the confirmation prompt.
[--format=<format>]
no
flag (value)
Output format.
Returns
The product ID, object key and the local path the download now points at.
Drives the same primitives the auto-offload flow uses: uploads the local file via S3_Handler::upload_file(), then rewrites the product download to an S3 shortcode via Shortcode::generate_shortcode(). Idempotent — a download that is already an S3 shortcode is reported as already_applied.
Options
Argument
Required
Type
Description
<product>
yes
positional
Product reference — numeric ID or SKU.
[--source=<local_path>]
no
flag (value)
Explicit local file to upload (defaults to the first local download file on the product).
[--dry-run]
no
flag
Resolve the source and target and report what would be uploaded.
This command permanently destroys data or applies a terminal state that cannot be undone from the CLI. Preview the exact effect with --dry-run, then re-run with --yes once you are certain.
Permanently delete S3 objects that no product maps to and that are old enough.
An orphan is a bucket object whose key is referenced by NO product download shortcode AND whose LastModified is older than --max-age-days. This is a foot-gun: a mis-set age or a partial product import can sweep live files. For that reason the real (non-dry-run) path REFUSES to run unless BOTH --max-age-days (explicit) and --yes are supplied. Always preview with --dry-run first.
Options
Argument
Required
Type
Description
[--filter=<json>]
no
flag (value)
Reserved JSON filter blob, recorded in the audit context for traceability.
[--max-age-days=<n>]
no
flag (value)
Only objects older than this many days are eligible. REQUIRED on the real path; defaults to 30 for the dry-run preview only.
[--bucket=<b>]
no
flag (value)
Bucket to scan (defaults to the configured ias_s3_default_bucket).
[--dry-run]
no
flag
List the orphans that would be deleted without contacting S3 for deletes.
[--yes]
no
flag
Skip the confirmation prompt.
[--format=<format>]
no
flag (value)
Output format.
Returns
The bucket, age threshold, number of objects scanned (and whether the scan hit the per-run cap), orphan count and — on the real path — every deleted key, the deleted count and the total bytes reclaimed.
Resolves the order item to its product, reads the product's S3-backed downloads, and presigns a fresh URL for each via S3_Handler::generate_presigned_url() — the same presign the Download_Handler serves to customers. Nothing is stored; this only mints time-limited URLs.
Options
Argument
Required
Type
Description
<order_item_id>
yes
positional
The WooCommerce order line-item ID.
[--dry-run]
no
flag
Report which files would be presigned without contacting S3.