Add From Server



Add From Server 主要用於降低不良網站主機所造成的困擾,讓網站管理員透過 FTP 或 SSH 上傳檔案,然後匯入至 WordPress 網站。

* 取代檔案上傳程式
* 移轉網站
* 網站更換主機商後,重新匯入網站檔案
* 批次匯入媒體檔案

* 匯入檔案大小超過主機託管服務商限制的檔案
* 匯入檔案大小大到會影響網際網路連線上傳速度的檔案

WordPress 處理檔案上傳的方式比這個外掛更好,在使用這個外掛前,請審慎思考外掛使用目的。

也可以參考 WP-CLI 的媒體匯入方式:
wp media import



從 3.4 版開始,這個外掛變更為會限制匯入檔案的來源目錄。
如果想從其他資料匯入檔案,必須在網站的 wp-config.php 檔案中加入 ADD_FROM_SERVER 常數。
define( 'ADD_FROM_SERVER', '/www/' );


為了提供網站安全性,WordPress 僅能匯入/上傳指定檔案類型。
如果想為網站加入額外的檔案類型,請使用 PJW Mime Config 之類的外掛,這樣便能覆寫相關的安全性函式,並為 WordPress 網站啟用全域、未經篩選的上傳功能。


如果匯入非標準上傳目錄 (標準目錄一般為 wp-content/uploads/) 中的檔案,便會將檔案複製至標準上傳目錄。
如果匯入已存在於上傳目錄中的檔案 (例如 wp-content/uploads/2011/02/,外掛不會複製任何檔案,並使用原有的檔案。


請前往外掛的 GitHub 存放庫回報程式碼錯誤。如需取得技術支援,請前往 技術支援論壇


2021 年 6 月 4 日
So I had to clone my site. Somehow none of the images stored in /wp-content/uploads/201X/## made it. I had lots of blog entries and pages with linked content. I did have a solid copy of the site on my local computer. I used FileZilla FTP to copy the original content back into /wp-content/uploads/... Everything looked good, but it just didn't work. Links would not work. I picked up this plugin to hopefully put everything back together. Odd thing was, the plugin couldn't see the original stuff either. Of the 40 folders I had within /wp-content/uploads/(year)/(Month) there was only one folder visible in the plugin... and that was the current year/month. With that I realized I may have the wrong file attributes set within the server. The current year month had file attributes "755" everything else had "744". Oops. FTP tool, Change file attributes, Numeric value 755, yes on Recurse into subdirectories, and TaaaaDaaa Success! My naming structure is intact, so I don't have to update any blog entries or page content So apparently I didn't actually need this plugin, but without it I wouldn't have been able to see what was causing the troubles. Many thanks to the support team for this plugin.
2021 年 3 月 27 日
This great plugin has helped me many times over the years to quickly add missing images to the media library after server migration. Each time I use it, it does a perfect job of restoring missing images! Thank you for this essential plugin!
2021 年 3 月 3 日
I use this plugin to have a custom location for my digital downloads on my server for WooCommerce. So instead of manually adding the URL location, I just use this to port it into WordPress and then search the media for the digital download to make my product page. Saves time. So I go to my Cpanel, to my custom file location for WooCommerce, upload new digital download, Make or edit product page, click media, use this plugin to find the file and import it to media. Now add it to product data "add File". Super helpful, a better way to keep track of the downloads instead of WordPress date folder structure system 🙂
2021 年 2 月 10 日
Quick thank you for this, it worked fine on WP 5.6.1. I was able to browse non-WP folders containing old website images which a Gallery Plugin wouldn't let me do as it restricted you to the WP folder, didn't need to keep them all but this made it quick to bulk select then untick the ones I didn't need, like manually created old thumbnails. Then ran the Regenerate Thumbnails plugin to be sure I had the correct size thumbnails automatically if and when needed and the XO Featured Images tool plugin to make sure my Featured Images were okay.
閱讀全部 225 則使用者評論


以下人員參與了開源軟體〈Add From Server〉的開發相關工作。


Add From Server 外掛目前已有 17 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將 Add From Server 外掛本地化為台灣繁體中文版


任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄



  • Fix a fatal error when WordPress or PHP requirements are not met.


  • Simplify the date handling


  • Better handling for / as the root path
  • Better compatibility with certain WordPress docker images
  • Better handling for some empty folders


  • Restore case insensitive alphabetical sorting


  • Plugin now requires WordPress 5.4+


  • The plugin now requires WordPress 5.1+ and PHP 7.0+. No reason other than why not.
  • Bumps the version to stop the invalid vulnerability warnings.
  • Cleans up code.
  • Removes the User Access Control. Any user with File Upload ability can now use the plugin.
  • Removes the Root Directory Control. The root directory is now assumed. You can use the ADD_FROM_SERVER constant to change it.
  • Removes the Quick Jump functionality.
  • Removes the ability to be able to select the date for imported media. It’s always today. Or, the 1st of the month if it’s stored in a dated folder.
  • Removed Media Manager integration, as it’s no longer shown with the WordPress Block Editor. Classic Editor is not supported by this plugin.