unapersona/delete-missing-attachments

Delete missing attachments from the media libray using WPCLI

1.0.0 2020-10-20 17:04 UTC

This package is auto-updated.

Last update: 2025-07-11 03:27:40 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