| 开发者 | tehnikamk |
|---|---|
| 更新时间 | 2026年10月27日 17:24 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
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.wget -i or curl.DELETE.tme_clean_protected_ids filter to protect media that plugins store in their own tables.wp:image, wp:gallery, wp:cover, wp:media-text and anything using id, ids, mediaId or attachmentIdwp-image-123 classes, wp-att-123 links and attachment_123 caption IDs[gallery], [playlist], [album], [slideshow], [carousel]?attachment_id=123src, srcset and lazy-load URLs, resolved back to attachment IDs through a bulk uploads indexwp tme export, wp tme clean and wp tme unused run the same engine from the command line./wp-content/plugins/tehnika-media-exporter, or install it through the WordPress plugins screen.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.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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
tme_clean_protected_ids filter.wp tme clean with a dry run by default, --yes, --action, --grace-days and --exclude.EMPTY_TRASH_DAYS is 0, because WordPress would delete the files permanently instead.mime layout instead of a non-existent post_type value.wp tme export, wp tme stats, wp tme unused.manifest.csv inside the archive.tme_source_post_args, tme_referenced_media_ids and tme_attachment_path filters for developers.ID and post_content only, instead of loading complete post objects to run a regular expression over one column.IN (…) clause is chunked, so six-figure libraries cannot overflow the query string.[gallery]/[playlist]/[slideshow] shortcodes, classic caption IDs and ?attachment_id= query strings.src/srcset/lazy-load URLs to attachments through a bulk uploads index rather than one lookup per URL.alert() with inline toasts.tehnika.mk as a contributor, but that is not a WordPress.org account, so the plugin page showed no author.screenshots-1.png, which WordPress.org does not recognise.index.php and .htaccess guards and is never web-accessible.seems_utf8 function with wp_is_valid_utf8 to ensure future compatibility.export.php file to comply with WordPress Plugin Guidelines.wp_enqueue_scripts for better performance and security.