[WordPress] 外掛分享: CSV Mass Importer

首頁外掛目錄 › CSV Mass Importer
WordPress 外掛 CSV Mass Importer 的封面圖片
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
20+
安裝啟用
尚無評分
3767 天前
最後更新
問題解決
WordPress 3.2+ v1.2 上架:2016-05-21

內容簡介

CSV 大量匯入器是一個完美的解決方案,可以透過 CSV 檔案大量匯入和匯出文章數據,支援內建的 WordPress 類型和自訂文章類型。

CSV 大量匯入器可以匯入附件,並與 WPML 相容。

資料匯出
在按下匯出按鈕之前,您可能需要在匯出部分中調整一些設置。

以下是您可以選擇的選項:

- 文章類型:您可以自由選擇預設 WordPress 文章類型或任何已註冊的自訂文章類型。
- 載入欄位:使用 "載入欄位" 按鈕查找與您之前選擇的文章類型相關聯的欄位,包括實體欄位、元數據和分類法。如果您沒有調用 "載入欄位" 操作或未勾選任何載入的欄位,CSV 大量匯入器將假定您要匯出與文章類型相關聯的所有數據。
- 日期:這將允許您在特定的時間段內匯出文章。留空以匯出所有日期。
- 限制:指定您要匯出的文章數量,或留空以匯出所有文章。
- 目的地:在這裡,您可以選擇對匯出的文件進行什麼操作,下載它,或將它留在服務器上的 /wp-content/cmi-data/data.csv。

請注意,CSV 大量匯入器不會匯出文章的媒體附件,但它可以匯入它們。

資料匯入和更新
當匯入數據時,請確保CSV文件結構良好。匯出一些文章作為模板始終是個好主意。以下是需要牢記的關鍵點:

- CSV 文件標頭(欄位名稱)
通常情況下,CSV 文件中的第一行代表欄位名稱。有三種數據類型:實體數據、元數據和分類法數據。要將元數據和分類法數據與實體數據區分開來,分別將 :meta 或 :taxonomy 添加到欄位名稱後。由於此版本的外掛沒有欄位映射功能,因此請確保在CSV標頭中提供正確的系統欄位名稱。

- 匯入新文章時的必填欄位和默認值
[ID](必填):如果我們創建新文章,每個文章項目的 ID 欄位必須包含 "new" 關鍵字。如果 ID 是一個整數,CMI 假定這是一個更新。
[post_type](可選):如果省略或為空,CMI 將假定您正在匯入 "post" 類型。
[post_content](可選):如果省略或為空,将作为虚拟值插入 "” ”"。

- 更新文章時的必填欄位
[ID](必填):當更新文章時,只需要 ID 欄位。該欄位需要一個整數。當然,将其单独使用沒有任何意义,請在您的 CSV 文件中加入您要更新的任何實體、元或分類欄位。

- 值
值可以是簡單或多個。多個值始終涉及到元數據或分類,並會跨越多行擴展,直到下一個數據行開始。

- 附件
當匯入帶有附件的文章時,您必須以不同的方式結構化匯入套件。為了匯入帶有附件的文章,請將媒體文件放在 /images 文件夾中。隨後,在 CSV 文件中添加 "attachments" 列,並為每個文章項目分別填寫媒體文件名(不帶路徑,僅文件名)。您可以輸入多個值,每個儲存格一個。

指定縮略圖很簡單。要這樣做,請在您的 CSV 文件中添加一個 "thumbnail" 列,並為每個文章項目分別填寫文件名。附件文件必須…(此段資訊不完整,應為還有后續敘述)

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「CSV Mass Importer」→ 直接安裝(推薦)

原文外掛簡介

CSV Mass Importer is a perfect solution for those looking to import and export post data in a massive manner through CSV file. It supports built-in wordpress types and custom post types.
CSV Mass Importer can import attachments and is compatible with WPML.
EXPORTING DATA
Before you hit the Export button you may want to adjust some settings in the Export section.
Here are the options you have:
— Post type
You are free to choose between defaut wordpress post types or any custom post type registered.
— Load fields
Use “Load fields” button to discover fields associated with the post type you selected previously,
it includes entity fields, metas and taxonomies. If you don’t invoke “Load fields” action or don´t check any of the loaded
fields CSV Mass Importer will assume you are trying to export all the data associated with the post type.
— Dates
This will allow you to export posts within a specific time period. Leave empty to export all dates.
— Limit
Specify the number of posts you want to export or leave empty to export them all.
— Destination
Here you select what to do with the exported file, download it or leave it on the server at /wp-content/cmi-data/data.csv.
Note that CSV Mass Importer does not export post’s media attachments, but it does import them, see below.
IMPORTING AND UPDATING DATA
When importing data be sure to have a well structured data file. Its always a good idea to export a number of posts that will serve you as a template. These are the key points to keep in mind:
— CSV file header (field names)
As usual, the first row in the CSV file represents field names.
There are three data types: entity data, meta data and taxonomy data.
To distinguish meta data and taxonomy data from the entity data append :meta or :taxonomy to the field name respectively.
This plugin version does not include fields mapping facility, therefore be sure to provide correct field system names in your CSV header.
— Required fields and default values when importing new posts
[ID] (required). In case we are acreating new posts the ID field must contain “new” keyword for each post entry.
If ID is an integer, CMI assumes its an update.
[post_type] (optional). If ommited or empty CMI will assume you are importing “post” type.
[post_content] (optional). If ommited or empty ” ” will be inserted as a dummy value.
— Required fields when updating posts
[ID] (required). ID is the only required field when updating posts. This field expects an integer. Of course it makes no sense
to have it alone, add whatever entity, meta or taxonomy field you want to update to your CSV file.
— Values
Values may be simple or multiple. Multiple values always refer to metas or taxonomies and will expand across multiple rows until
the next data row begins.
— Attachments
When importing posts with attachments you have to structure the import package differently.
In order to import posts with attachments place media files in /images folder. Then, add “attachments” column in the CSV file and
fill it with media file names (no paths, just file names) for each post entry respectively. You can enter multiple values, one per cell.
Assigning thumbnail is simple. To do this, add a “thumbnail” column to your CSV file and fill it with file name for
each post entry respectively. The attachment file must be one of the files you entered in the “attachments” column.
Requirements to the import package when importing data with attachments.
When importing posts with attachments it is important how you name the CSV file and where you place media files.
The requirement is to name the CSV file as data.csv and place the attachment files in /images folder:
/data.csv
/images/myimage1.png
/images/myimage2.png
/images/myimage3.png
/images/myimage4.png
/images/myimage5.png
For direct upload method, compress data package as a zip archive.
If you prefer to upload files by FTP, place them in /wp-content/uploads/cmi-data folder of your wordpress installation.
— Multilingual content with WPML
CSV Mass Importer can import post translations at the same time you import original post data in original language.
To accomplish this create “lang” column and set language code for each post entry as a two-digit code (e.g. en, fr, de, es …).
Its important that translated posts go after the original post.
— Post taxonomies
CSV Mass Importer does not create taxonomy terms. Make sure taxonomy terms exist prior to the data import.
— Deleting metas
Meta values and taxonomies will be deleted if value cell is empty. To prevent this “Safe mode” is enbaled by default.
Troubleshooting

Export button freezes. This problem is normally due to server side errors such as PHP memory limit being too low.
Increase memory_limit in your server and try again.

延伸相關外掛

文章
Filter
Mastodon