Skip to content

Adding media diff to media command #6

@ChrisDean

Description

@ChrisDean

Following the contrib rules by opening a ticket before issuing a a PR ;)

We've put together a few functions here: https://github.com/DigitalTactics/wp-cli-mediadiff for listing what are likely to be orphan files (files on the file system in the uploads folder which don't (for whatever reason) have corresponding attachment entries - yes we know some plugins manage files here too which don't result in attachments hence the likely); we then have options to move these files to a trash folder for inspection/retention and/or then delete them permanently if appropriate.

We think it makes sense to have our diff command trail off of media command so wp media diff makes sense to us... but what are your thoughts? Is this something you want to include

We may have some more work to on this generally but what's currently there should be of some use already.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions