內容簡介
使用此 WordPress 外掛可掃描 WordPress 安裝,搜尋所有遺漏的附件檔案,從另一個 WordPress 安裝下載附件檔案,並調整其圖片大小到指定的圖片尺寸。
請注意,此外掛不會在您的安裝資料庫中建立新媒體檔案,它只會使用現有的媒體條目在您的資料庫中,以取回其他 WordPress 安裝中的實體檔案。
例如:http://serverA.com 在他的資料庫中有一個媒體條目mediaX。實體檔案的路徑應該是http://serverA.com/wp-content/uploads/2013/06/mediaX.jpg但是卻不存在。如果您知道這個媒體在http://serverB.com+實體檔案的位置,您可以在http://serverA.com上使用此外掛,並在 Server URL 欄位中指定http://serverB.com,該外掛將在此處搜尋檔案:http://serverB.com/wp-content/uploads/2013/06/mediaX.jpg。如果成功找到,檔案便會下載並放置在此處http://serverA.com/wp-content/uploads/2013/06/mediaX.jpg。
您需要這個外掛嗎?
如果您在多個伺服器上安裝了同一個專案副本,此外掛非常有用。
例如,一個開發團隊,每個開發者都在生產伺服器上具有「主」安裝的副本。定期地,會將『主』安裝程式的資料庫提供給開發人員,他們會通過版本控制系統(如 SVN、GIT、Mercurial)更新其程式碼。上傳的檔案夾可能沒有版本管理,這是好的,因此此外掛對於從『主』安裝中下載媒體非常有用。
如何使用它?
在管理區中,到 [工具/匯入] 並選擇 [Attachment files importer],從這裡,輸入包含媒體實體檔案的 WordPress 安裝程式 URL,並按 [匯入]。
現有的檔案不會被覆蓋。
偵錯
此外掛目前處於早期階段,可能會出現錯誤。如果您想顯示匯入過程的詳細報告,在 wp-config.php 檔案中加入此行:
define('ATTACHMENT_FILES_IMPORT_DEBUG', true);
外掛標籤
開發者團隊
原文外掛簡介
Scan your WordPress installation for all missing attachment files, download them from another WordPress installation and resize them with your defined image sizes.
Know that the plugin will not create new media on your installation database, it’ll just use the existings entries of medias in your database to retrieve the physical files on another WordPress installation.
E.g.: http://serverA.com have an entry for the mediaX in his database. The path for the physical file is supposed to be http://serverA.com/wp-content/uploads/2013/06/mediaX.jpg but it’s not here. If you know that this same media exists on http://serverB.com + the physical file, you can use this plugin on http://serverA.com, specifying http://serverB.com in the Server URL field and the plugin will search the file here: http://serverB.com/wp-content/uploads/2013/06/mediaX.jpg. If it find it, it will be downloaded here: http://serverA.com/wp-content/uploads/2013/06/mediaX.jpg.
Do you need this?
This plugin is useful if you have multiple instances of a same project installed on multiple servers.
For example, a team of developers, each of them having a copy of the “master” installation located at the production server. Periodically, the database of the “master” installation is given to the developers who update their code through a VCS (like SVN, GIT, Mercurial). There is chance that the uploads folder is not versionned, which is good, so the plugin is useful here to download the medias from the “master” installation.
How tu use it?
In the admin, go to Tools/Import and choose the Attachment files importer. From here, enter the URL of the WordPress installation that contain the physical files of medias and click Import.
Existing files will not be overriden.
Debug
The plugin is in an early stage and bugs may occurs. If you want to show a detailled report of the importation process, add this line to your wp-config.php file:
define('ATTACHMENT_FILES_IMPORT_DEBUG', true);
