Linux 软件免费装
Banner图

Tehnika Media Exporter & Cleaner

开发者 tehnikamk
更新时间 2026年10月27日 17:24
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

media library bulk delete media cleaner media export delete unused media

下载

2.0.0 2.1.0 2.1.1 1.0.7

详情介绍:

Tehnika Media Exporter & Cleaner gives you two jobs in one screen. Export the media that belongs to a migration, a backup or a hand-over — and clean up the files nothing on the site uses any more. Both tools share the same filter engine. An export and a cleanup can start from the same selection, which makes the safe workflow obvious: export a backup, then clean the original. Every job runs as a sequence of short server batches instead of one long request, so PHP time limits and memory limits stop being a problem. Finished archives are streamed to your browser in chunks and never loaded into PHP memory. Export Three ways to scope an export Five output formats Clean The Clean tab uses the same scope filters, then adds the decisions that matter before anything is removed. Accurate usage detection Most tools look for a single pattern. This one recognises: Built for real libraries About the Author Maintained by Tehnika, a creative digital agency working with remote teams and WordPress. We built this to solve our own migration headaches and decided to share it. Use cases
  1. Migrating content — move selected posts to another site together with the images they actually use.
  2. Backups — download everything uploaded by a specific author last month, as a ZIP.
  3. Auditing — get a CSV of every document in a category, with sizes and parent posts.
  4. Housekeeping — find and trash media nothing references any more, with an audit log to prove what was removed.
  5. Storage recovery — retire old PDFs, archives and oversized images without touching the current season.
  6. Automation — drive exports and dry-run cleanups from WP-CLI in a deployment or archiving script.

安装:

  1. Upload the plugin files to /wp-content/plugins/tehnika-media-exporter, or install it through the WordPress plugins screen.
  2. Activate the plugin.
  3. Go to Tools → Tehnika Media.
The working folder lives at wp-content/uploads/tme-exports/. It is created automatically and blocked from direct web access; downloads and cleanup logs always go through WordPress so the permission check cannot be bypassed.

屏幕截图:

  • The Clean tab — unreferenced media selected, with count, size and a per-type breakdown before anything is touched.
  • The confirmation dialog — the exact file count, sample names and the action you are about to take.
  • A finished cleanup — files moved to the trash, with the CSV audit log ready to download.
  • Library analytics — breakdown by file type, uploads per month and the top uploaders.
  • The Log tab — exports and cleanups side by side, with the audit log attached to each cleanup.
  • Help — how a job runs, the cleaner safety model, the format reference and WP-CLI recipes.

升级注意事项:

2.1.1 Fixes the Clean tab not responding when an older admin script is cached, makes the Library → Cleaner link reliable, adds visible preview/error feedback, and cache-busts the admin assets. 2.1.0 Adds the Clean tab: trash unreferenced or filtered media with a review dialog, safety window, exclusion list and CSV audit log. Permanent deletion is opt-in and off by default. Renamed to Tehnika Media Exporter & Cleaner.

常见问题:

Does this plugin require any server extensions?

ZIP export needs the PHP zip extension. Everything else — URL list, CSV, JSON, XML and the cleaner — works without it. If ZIP is unavailable the plugin tells you so on its screen and greys the option out.

How large an export or cleanup can it handle?

Neither job holds a whole archive or file list in PHP memory, and both work in small batches, so they are bounded by disk space rather than by memory or execution limits. If a host is unusually strict, lower Files per batch and Seconds per batch on the Settings tab; the job simply takes more requests.

Is anything deleted by this plugin?

Only when you explicitly run a cleanup and confirm it. Exports are read-only. Cleanup defaults to Move to trash, which is reversible. Delete permanently is off by default, limited to administrators, and requires typing DELETE in the confirmation dialog.

Can I undo a cleanup?

Yes, if you chose Move to trash. WordPress keeps trashed attachments and their files until the trash is emptied; restore them from Media → Trash. Permanent deletion cannot be undone, which is why it is opt-in and every run produces a CSV audit log.

What if my site has disabled the WordPress trash?

If your site sets EMPTY_TRASH_DAYS to 0, WordPress does not keep trashed media. The cleaner detects this and refuses to run Move to trash, because core would delete the files permanently. Enable trash retention or use permanent deletion explicitly.

What is in the cleanup audit log?

One row per attachment: ID, file name, URL, MIME type, size on disk, upload date, author ID, parent post, the action taken and a timestamp. It is downloadable from the Clean tab immediately after a run and from the Log tab later.

What counts as "unreferenced" media?

An attachment with no parent post, no featured-image or gallery reference, no inline reference in post content, and no reference from the site icon, site logo or theme logo. Page builders and plugins that store IDs in their own tables need the tme_clean_protected_ids filter or the exclusion list.

Are unpublished posts included in the usage scan?

By default only published content is scanned for references, so drafts and scheduled posts do not leak media into an export. Add those statuses explicitly in the post status filter when you want them.

Where do finished exports go?

Into a protected folder inside your uploads directory, for as long as you configure (24 hours by default). They can be downloaded again from Recent exports, and are then swept automatically. Nothing is left behind after that.

What happens when I uninstall it?

Nothing is removed unless you tick "Delete settings, log, presets and the export folder when the plugin is uninstalled" on the Settings tab. That is off by default.

更新日志:

2.1.1 2.1.0 2.0.0 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.0