
內容簡介
Tehnika Media Exporter 是一款精確提取 WordPress 媒體庫中媒體檔案的外掛,能夠根據網站使用情況選擇性導出媒體。即使在擁有數萬個檔案的情況下,仍能穩定運行,並有效解決 PHP 時間和記憶體限制問題。
【主要功能】
• 支援全庫導出、特定內容媒體導出或未引用媒體導出
• 提供多種輸出格式,包括 ZIP、CSV、JSON 和 WXR XML
• 批次處理,支持恢復導出進度
• 實時進度顯示,顯示處理的檔案數量
• 支援 WP-CLI 命令行導出
外掛標籤
開發者團隊
原文外掛簡介
Tehnika Media Exporter extracts media from your WordPress library with precision. Instead of dumping everything, it lets you target media by how it is used on your site — and it keeps working when your library has tens of thousands of files.
Every export runs as a sequence of short server batches rather than one long request, so PHP time limits and memory limits stop being a problem. The finished archive is streamed to your browser in chunks, never loaded into PHP memory.
What it does
Three ways to scope an export
The whole library — every attachment, narrowed by file type, uploader and date range.
Media used by specific content — start from posts, pages or any public custom post type, narrow them by category, tag and post status, then follow the featured image, the files uploaded to the post, the images embedded in its body, or any combination.
Unreferenced media — attachments that no post, page, featured image, gallery or site option points at. A ready-made cleanup audit.
Five output formats
ZIP archive — the actual files, with an optional folder structure (flat, by upload date, or by media type), an optional manifest.csv inside the archive, and optional inclusion of the generated thumbnail/medium/large versions. Duplicate file names are prefixed with their attachment ID so nothing is silently overwritten.
URL list — one direct file URL per line, ready for wget -i or curl.
CSV manifest — a spreadsheet of every file: ID, name, URL, MIME type, size, dimensions, upload date, author and parent post.
JSON manifest — the same data for scripts and migrations.
WXR XML — a WordPress import file containing the selected attachments and their metadata.
Built for real libraries
Batched, resumable exports. Progress is stored on the server, so a huge export survives a page reload — and it can be downloaded again later from Recent exports.
Honest progress. A live percentage based on bytes and file counts, with the number of files processed and any that were missing.
Preview before you commit. Count, total size and a breakdown by file type, without building anything.
Searchable pickers. Category, tag and uploader fields search through AJAX, so a site with 20,000 terms still opens instantly.
Cached analytics. Library breakdown, uploads per month, top uploaders and an unreferenced-media scan.
WP-CLI. wp tme export runs the same engine from the command line for very large jobs.
Accurate usage detection
Most exporters look for a single pattern. This one recognises:
Gutenberg block attributes — wp:image, wp:gallery, wp:cover, wp:media-text and anything using id, ids, mediaId or attachmentId
Classic editor markup — wp-image-123 classes, wp-att-123 links and attachment_123 caption IDs
Shortcodes that carry IDs — , , [album], [slideshow], [carousel]
Query strings such as ?attachment_id=123
With deep scan enabled: raw src, srcset and lazy-load URLs, resolved back to attachment IDs through a bulk uploads index
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
Migrating content — move selected posts to another site together with the images they actually use.
Backups — download everything uploaded by a specific author last month, as a ZIP.
Auditing — get a CSV of every document in a category, with sizes and parent posts.
Housekeeping — find media nothing references any more before you clean it up.
Automation — drive exports from WP-CLI in a deployment or archiving script.
