[WordPress] 外掛分享: Autoremove Attachments

首頁外掛目錄 › Autoremove Attachments
WordPress 外掛 Autoremove Attachments 的封面圖片
3,000+
安裝啟用
★★★★★
5/5 分(15 則評價)
947 天前
最後更新
問題解決
WordPress 5.8+ PHP 7.4+ v1.3.1 上架:2015-07-09

內容簡介

Autoremove Attachments 可以幫助您保持媒體庫的整潔,當您刪除帖子、頁面或自訂的文章類型時,它可以刪除作為子附件附加的所有媒體文件。

默認情況下,當您從您的網站刪除內容時,無論是帖子、頁面、產品或任何類型的文章,WordPress 都會保留先前與其關聯的媒體文件,即使在刪除內容後,它們在任何其他地方都不使用。

Autoremove Attachments 嘗試通過自動刪除所有與已刪除的內容具有子父關係的媒體文件來解決此問題。(因此,您不必手動跟踪和刪除留在您的服務器上的孤兒文件)。

重要考慮事項

放置您的帖子、頁面或自定義文章類型到垃圾桶中的軟刪除不會觸發其子附件的刪除。清空垃圾桶時才會發生清除。
當您刪除帖子、頁面或自定義文章類型時,我們會嘗試確定其子附件是否在您的網站上的任何其他地方使用。如果是,我們就不會刪除它們,以免出現壞鏈接。
可從媒體設置中禁用自動刪除之前的額外檢查,以在具有數千篇文章和媒體文件的大型網站上提高性能。
該插件僅刪除 WordPress 跟踪的文件。一些編寫不良的主題會生成額外的縮略圖大小,這些縮略圖並未被 WordPress 跟踪,這將導致在您的服務器上留下孤立文件。

兼容性和第三方支援

WooCommerce
Easy Digital Downloads
所有符合 WordPress 標準的主題和插件

如果您使用插件來優化和清理您的修訂版本、刪除的帖子等數據庫內容,請確保您使用依賴於本機 WordPress 函數執行維護任務的插件。我們推薦使用 WP-Sweep。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.3.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Autoremove Attachments」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Autoremove Attachments helps you keep the Media Library clean by deleting all media files attached as child attachments to a post, page, or custom post type when the parent is deleted.
By default, when you delete content from your website, regardless if it’s a post, a page, a product, or any kind of post type, WordPress keeps the media files previously associated with it, even if after the removal of your content they are not used anywhere else.
Autoremove Attachments tries to solve this problem by automating the removal of all media files that have a child-parent relationship with the removed content. (so you don’t have to manually track and remove orphan files left on your server)
Important Considerations

A soft delete that places your post, page, or custom post type in Trash will not trigger the removal of its child attachments. The purge happens when you empty your trash.
When you delete a post, page or custom post type, we try to determine if its child attachments are used anywhere else on your website. If they are, we do not remove them, to prevent broken links.
The additional checks before the automatic removal can be disabled from the Media Settings for improved performance on large websites with thousands of posts and media files.
The plugin only removes files tracked by WordPress. Some poorly coded themes generate additional thumbnail sizes that are not tracked by WordPress and this always leads to orphan files left on your server.

Compatibility and Third-Party Support

WooCommerce
Easy Digital Downloads
All themes and plugins that do things the WordPress way

If you use a plugin to optimize and clean your database of revisions, trashed posts, etc, make sure you use one that relies on native WordPress functions to perform the maintenance tasks. We recommend WP-Sweep.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon