It's All Stack · CLI Reference

IAS S3 Storage

S3-backed downloads: verify, inspect, regenerate links, offload, migrate back and purge orphans.

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.

wp ias s3-storage audit-log#

Read the plugin's admin audit log (settings, licence and upload events).

wp ias s3-storage audit-log [--action=<action>] [--page=<page>] [--per-page=<per-page>] [--format=<format>]

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

ArgumentRequiredTypeDescription
[--action=<action>]noflag (value)Only entries for this action (e.g. settings_changed, license_activated, license_deactivated, file_uploaded, connection_tested, cache_cleared).
[--page=<page>]noflag (value)Page of results (1-based).
[--per-page=<per-page>]noflag (value)Results per page (capped at 1000).
[--format=<format>]noflag (value)Output format.

Examples

wp ias s3-storage audit-log --format=json
wp ias s3-storage audit-log --action=file_uploaded --per-page=100

Related

wp ias s3-storage download-logs · wp ias s3-storage inspect · wp ias s3-storage inspect-bucket · wp ias s3-storage list-products · wp ias s3-storage migrate-from-s3 · wp ias s3-storage offload · wp ias s3-storage purge-orphans · wp ias s3-storage regenerate-link

wp ias s3-storage download-logs#

Read recent S3 download-delivery log lines (WooCommerce file logs).

wp ias s3-storage download-logs [--since=<date>] [--customer=<customer>] [--page=<page>] [--per-page=<per-page>] [--format=<format>]

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

ArgumentRequiredTypeDescription
[--since=<date>]noflag (value)Only lines on/after this date (anything strtotime understands).
[--customer=<customer>]noflag (value)Substring-match log lines for this customer reference (email fragment).
[--page=<page>]noflag (value)Page of results (1-based).
[--per-page=<per-page>]noflag (value)Results per page (capped at 1000).
[--format=<format>]noflag (value)Output format.

Example

wp ias s3-storage download-logs --since="-7 days" --format=json

Related

wp ias s3-storage audit-log · wp ias s3-storage inspect · wp ias s3-storage inspect-bucket · wp ias s3-storage list-products · wp ias s3-storage migrate-from-s3 · wp ias s3-storage offload · wp ias s3-storage purge-orphans · wp ias s3-storage regenerate-link

wp ias s3-storage inspect#

Report the plugin slug, version and CLI environment.

wp ias s3-storage inspect [--format=<format>]

Options

ArgumentRequiredTypeDescription
[--format=<format>]noflag (value)Output format.

Example

wp ias s3-storage inspect

Related

wp ias s3-storage audit-log · wp ias s3-storage download-logs · wp ias s3-storage inspect-bucket · wp ias s3-storage list-products · wp ias s3-storage migrate-from-s3 · wp ias s3-storage offload · wp ias s3-storage purge-orphans · wp ias s3-storage regenerate-link

wp ias s3-storage inspect-bucket#

Inspect a bucket: region plus a sample of its objects.

wp ias s3-storage inspect-bucket <bucket> [--prefix=<prefix>] [--max=<max>] [--format=<format>]

Options

ArgumentRequiredTypeDescription
<bucket>yespositionalBucket name.
[--prefix=<prefix>]noflag (value)Restrict the object sample to this key prefix.
[--max=<max>]noflag (value)Maximum sample objects to list (capped at 1000).
[--format=<format>]noflag (value)Output format.

Example

wp ias s3-storage inspect-bucket my-bucket --prefix=downloads/

Related

wp ias s3-storage audit-log · wp ias s3-storage download-logs · wp ias s3-storage inspect · wp ias s3-storage list-products · wp ias s3-storage migrate-from-s3 · wp ias s3-storage offload · wp ias s3-storage purge-orphans · wp ias s3-storage regenerate-link

wp ias s3-storage list-products#

List products that have S3-backed downloadable files.

wp ias s3-storage list-products [--format=<format>]

Options

ArgumentRequiredTypeDescription
[--format=<format>]noflag (value)Output format.

Example

wp ias s3-storage list-products --format=json

Related

wp ias s3-storage audit-log · wp ias s3-storage download-logs · wp ias s3-storage inspect · wp ias s3-storage inspect-bucket · wp ias s3-storage migrate-from-s3 · wp ias s3-storage offload · wp ias s3-storage purge-orphans · wp ias s3-storage regenerate-link

wp ias s3-storage migrate-from-s3#

Pull a product's S3-backed download back to local storage (reverse offload).

wp ias s3-storage migrate-from-s3 <product> [--bucket=<b>] [--dry-run] [--yes] [--format=<format>]

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

ArgumentRequiredTypeDescription
<product>yespositionalProduct reference — numeric ID or SKU.
[--bucket=<b>]noflag (value)Override the source bucket (defaults to the shortcode/option bucket).
[--dry-run]noflagReport the object key, source bucket and planned local path without contacting S3.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Returns

The product ID, object key and the local path the download now points at.

Examples

wp ias s3-storage migrate-from-s3 42 --dry-run
wp ias s3-storage migrate-from-s3 42 --yes

Related

wp ias s3-storage audit-log · wp ias s3-storage download-logs · wp ias s3-storage inspect · wp ias s3-storage inspect-bucket · wp ias s3-storage list-products · wp ias s3-storage offload · wp ias s3-storage purge-orphans · wp ias s3-storage regenerate-link

wp ias s3-storage offload#

Offload a single product's local download file to S3 (manual trigger).

wp ias s3-storage offload <product> [--source=<local_path>] [--dry-run] [--yes] [--format=<format>]

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

ArgumentRequiredTypeDescription
<product>yespositionalProduct reference — numeric ID or SKU.
[--source=<local_path>]noflag (value)Explicit local file to upload (defaults to the first local download file on the product).
[--dry-run]noflagResolve the source and target and report what would be uploaded.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Examples

wp ias s3-storage offload 42
wp ias s3-storage offload 42 --source=/var/www/uploads/big.zip --dry-run

Related

wp ias s3-storage audit-log · wp ias s3-storage download-logs · wp ias s3-storage inspect · wp ias s3-storage inspect-bucket · wp ias s3-storage list-products · wp ias s3-storage migrate-from-s3 · wp ias s3-storage purge-orphans · wp ias s3-storage regenerate-link

wp ias s3-storage purge-orphans#

⚠ Irreversible — --dry-run first.

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.

wp ias s3-storage purge-orphans [--filter=<json>] [--max-age-days=<n>] [--bucket=<b>] [--dry-run] [--yes] [--format=<format>]

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

ArgumentRequiredTypeDescription
[--filter=<json>]noflag (value)Reserved JSON filter blob, recorded in the audit context for traceability.
[--max-age-days=<n>]noflag (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>]noflag (value)Bucket to scan (defaults to the configured ias_s3_default_bucket).
[--dry-run]noflagList the orphans that would be deleted without contacting S3 for deletes.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (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.

Examples

wp ias s3-storage purge-orphans --max-age-days=90 --dry-run
wp ias s3-storage purge-orphans --max-age-days=90 --yes

Related

wp ias s3-storage audit-log · wp ias s3-storage download-logs · wp ias s3-storage inspect · wp ias s3-storage inspect-bucket · wp ias s3-storage list-products · wp ias s3-storage migrate-from-s3 · wp ias s3-storage offload · wp ias s3-storage regenerate-link

wp ias s3-storage show#

Show the S3 file mapping and presign config for a product.

wp ias s3-storage show <product> [--format=<format>]

Options

ArgumentRequiredTypeDescription
<product>yespositionalProduct reference — numeric ID or SKU.
[--format=<format>]noflag (value)Output format.

Example

wp ias s3-storage show 42 --format=json

Related

wp ias s3-storage audit-log · wp ias s3-storage download-logs · wp ias s3-storage inspect · wp ias s3-storage inspect-bucket · wp ias s3-storage list-products · wp ias s3-storage migrate-from-s3 · wp ias s3-storage offload · wp ias s3-storage purge-orphans

wp ias s3-storage verify-credentials#

Test connectivity with the current S3 credentials.

wp ias s3-storage verify-credentials [--format=<format>]

Options

ArgumentRequiredTypeDescription
[--format=<format>]noflag (value)Output format.

Example

wp ias s3-storage verify-credentials

Related

wp ias s3-storage audit-log · wp ias s3-storage download-logs · wp ias s3-storage inspect · wp ias s3-storage inspect-bucket · wp ias s3-storage list-products · wp ias s3-storage migrate-from-s3 · wp ias s3-storage offload · wp ias s3-storage purge-orphans