| 开发者 | reinventwp |
|---|---|
| 更新时间 | 2026年10月14日 15:02 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp media-cleanup scan, list, trash --all-safe, restore, empty-trash, usage.Media Cleanup reads page builder data directly (for example Elementor's _elementor_data, Divi shortcodes, Beaver Builder settings), plus custom fields, plugin tables and generated CSS. If a file is referenced anywhere in that data, it's kept. Anything uncertain is marked "Check first".
The file and all its resized copies move to a private folder in wp-content that visitors can't open. The Media Library entry is hidden but kept. Restore puts everything back exactly where it was.
When someone requests a trashed file's URL, the request reaches WordPress because the file is missing. Media Cleanup recognizes the path, records the request and (by default) restores the file immediately. Use Test now on the Home screen to check your server supports it.
Yes. The scan works in small steps that fit your server's time limit and saves its progress after each one. Close the page and it continues in the background with WP-Cron, or run wp media-cleanup scan over SSH.
Each site is scanned on its own from its own Media → Cleanup screen.
The file looks unused, but there's a reason to look before removing it: it's still attached to a page, it was uploaded recently, it isn't an image (PDFs are often linked from emails), or part of your site couldn't be read.
Only what you type into the settings search, and error reports from the admin page. See External Services above.