[WordPress] 外掛分享: Upload Janitor

前言介紹

  • 這款 WordPress 外掛「Upload Janitor」是 2010-01-15 上架。
  • 目前有 50 個安裝啟用數。
  • 上一次更新是 2010-01-20,距離現在已有 5583 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 2.6 以上版本才可以安裝。
  • 有 4 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

michaeltyson |

外掛標籤

clean | files | delete | unused | upload |

內容簡介

透過刪除不再使用的舊上傳檔案,恢復磁碟空間並清理上傳資料夾。

此外掛可識別上傳資料夾中未使用的檔案,並讓您選擇備份後刪除其中部分或全部檔案。

在採取任何行動之前, Upload Janitor 會自動建立一個包含所有要刪除檔案的「tar」檔案,包括原始路徑,以便必要時可還原。

如何運作?

此外掛會檢查上傳資料夾內的每個檔案。對於每個檔案,它都會搜尋參考該檔案的頁面或文章。也就是說,該外掛會搜尋每個檔案路徑中上傳資料夾之後的路徑部分,例如「2010/01/my great but forgotten image.jpg」。

該路徑會按原樣、含有「%20」的 URL 編碼,以及使用「+」代替空格的 URL編碼(即 2010/01/my+great+but+forgotten+image.jpg)。該外掛還會搜尋所有這些的 HTML entity 編碼形式。

如果沒有找到任何匹配項目,則該檔案被視為未使用。

請注意,該外掛是安全的,並且不區分舊的文章/頁面修訂版和當前版本。如果對某個修訂版所做的引用存在,則引用的檔案將被視為正在使用中。

還原

如果出現問題,您總是可以還原。如果您可以存取網站的 shell,這很簡單。只需登錄,瀏覽到您的的 wp-content/plugins 目錄,然後找到 Upload Janitor 備份檔案,它看起來像 upload_janitor_archive_YYYY-mm-dd.tar.gz。然後輸入:

tar zxf .

這會還原彙總檔案中的所有檔案。

如果您不能存取網站的 shell,您將需要下載彙總檔案,解壓縮並將其內容上傳回您的網站。該彙總檔案將可在 http://your-blog.com/wp-content/uploads/upload_janitor_archive_YYYY-mm-dd.tar.gz 取得。

原文外掛簡介

Reclaim disk space and clean up your uploads folder by deleting old uploads you are no longer linking to.
This plugin will identify unused files within your uploads folder, and give you the option of archiving then deleting
some or all of these files.
Before any action is taken, Upload Janitor will automatically make a ‘tar’ archive of all files to be
erased, including their original paths, so you can restore if necessary.
How does it work?
This plugin inspects every file within the uploads folder. For each file, it searches pages or posts that
reference the file. That is, the plugin searches for the part of each file’s path that comes after the path
to the uploads folder, such as 2010/01/my great but forgotten image.jpg.
The path is searched as-is, as well as URL-encoded with ‘%20’ for spaces, and the same with ‘+’ for spaces –
2010/01/my%20great%20but%20forgotten%20image.jpg and 2010/01/my+great+but+forgotten+image.jpg. HTML entity-encoded
forms of all of these are also searched.
If no matches are found, then the file is considered unused.
Note that this plugin plays it safe, and does not distinguish between older post/page revisions and the current version
of a post/page. If a revision references a file, the file will be considered still in use.
Restoring
If something goes wrong, you can always restore. If you have shell access to your site, this is easy. Simply log in,
navigate to your wp-content/plugins directory, and locate the Upload Janitor archive – it will look like
upload_janitor_archive_YYYY-mm-dd.tar.gz. Then, type:
tar zxf .

This will restore all files within the archive.
If you do not have shell access to your server, you will have to download the archive, extract it, then upload the
contents back to your server. The archive will be accessible at http://your-blog.com/wp-content/uploads/upload_janitor_archive_YYYY-mm-dd.tar.gz

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Upload Janitor」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


0.1 | 0.2 | trunk |

延伸相關外掛(你可能也想知道)

  • Optimize Database after Deleting Revisions 》這個外掛是一個「一鍵式」WordPress資料庫清理/優化器。, 主要功能, , 刪除文章、頁面和/或自訂文章類型的修訂版本(您可以選擇保留最近的「X」個修訂版本,...。
  • WP Bulk Delete 》WP Bulk Delete 是一款 WordPress 外掛,可讓您使用不同的強大篩選和條件,以批量方式刪除文章、頁面、評論、使用者、分類術語和元字段。 WP Bulk Delete 幫...。
  • Bulk Delete 》Bulk Delete 是一個 WordPress 外掛,可以根據不同的條件和過濾器批次刪除文章、頁面、附件、使用者和元資料。此外掛支援以下條件和過濾器:, , 刪除文章, , ...。
  • WP Favicon Remover 》WP Favicon Remover 外掛功能是移除自 WordPress 5.4 起的預設 Favicon。如果在外掛安裝後 Favicon 仍未更改,請清除瀏覽器快取。如果您使用的是透過主題客製...。
  • Simple Revisions Delete 》這個外掛允許您逐個或一次性刪除文章的修訂版(清除或批量動作)。與 Gutenberg(實驗性的)和經典編輯器兼容。, 它有什麼作用?, Simple Revisions Delete ...。
  • Delete Pending Comments 》此外掛可以快速刪除所有待審核和垃圾評論,對於受到垃圾評論攻擊的使用者非常有用。, 安裝後,請前往「評論」->「刪除待審核評論」,按照說明刪除所有待審...。
  • Delete Me 》允許具有特定 WordPress 角色的使用者在「個人資料」(Your Profile) 頁面或任何使用 Shortcodes 的地方,使用 Shortcode [plugin_delete_me /] 刪除自己。, ...。
  • DNUI 》不再維護, 該外掛已不再維護,您可以在 https://wordpress.org/plugins/ultimate-media-cleaner/ 查看新開發的版本, 我會稍等一段時間再刪除該存儲庫, 現在可...。
  • Remove Author Pages 》這個外掛會針對所有作者頁面啟動 404 錯誤,並將 WordPress 產生的作者連結替換為連結到首頁的連結。, 這個外掛沒有任何設置,它被設計成為一個簡單易用的工...。
  • Media Hygiene: Remove or Delete Unused Images and More! 》WordPress 外掛介紹:, , - Media Hygiene 外掛可從 WordPress 媒體庫中刪除未使用的檔案,釋放網站主機空間、減少磁碟空間使用、縮小網站備份檔案大小和提升...。
  • Delete Custom Fields 》有沒有遇到過一個錯誤地輸入的自訂欄位名稱,讓所有使用者感到困惑,你卻無法摆脱它? Delete Custom Fields 外掛將允許你從你的網站上刪除自訂欄位的每個實...。
  • Post Lockdown 》Post Lockdown 會禁止非管理員使用者刪除或丟棄您網站上的關鍵頁面和文章。, 此外,該外掛還可以鎖定頁面和文章,禁止編輯以及刪除或丟棄。, 該外掛會在 Word...。
  • Mass Delete Unused Tags 》刪除所有未使用的標籤,若您想要輕鬆清理部落格以重新開始,此外掛非常實用。, 由以下人員編寫: MijnPress.nl Twitter 連結 其他外掛。
  • Auto Prune Posts 》這個外掛可以依據設定的時間,自動刪除已過期的文章或頁面,並且可以針對特定類別(一個類別或全部類別)執行此動作。, 如果您想要讓文章擁有有限的時間性,...。
  • Delete Post with Attachments 》預設情況下,當您刪除文章或頁面時,該文章所關聯的媒體檔案或附件並不會被刪除。將這些孤立的檔案保留在您的伺服器上只會佔用大量寶貴的網路空間,而沒有任...。

文章
Filter
Apply Filters
Mastodon