unapersona/delete-missing-attachments

Delete missing attachments from the media libray using WPCLI

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:wp-cli-package

pkg:composer/unapersona/delete-missing-attachments

1.0.0 2020-10-20 17:04 UTC

This package is auto-updated.

Last update: 2025-12-11 04:49:48 UTC


README

Delete missing attachments from the media libray using WPCLI. Based on wp-cli-media-restore .

Installation

If you're using WP-CLI v0.23.0 or later, you can install this package with:

wp package install unapersona/wp-cli-delete-missing-attachments

Or, using Composer directly:

composer require unapersona/wp-cli-delete-missing-attachments

Options

[--dry-run]

Run the media library scan and show report, but don't delete attachments.

Examples

wp media delete-missing --dry-run