Title: Advanced CSV Importer
Author: Takayuki Miyauchi
Published: <strong>2014 年 12 月 29 日</strong>
Last modified: 2015 年 4 月 24 日

---

搜索插件

![](https://ps.w.org/advanced-csv-importer/assets/banner-772x250.png?rev=1056456)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/advanced-csv-importer/assets/icon-128x128.png?rev=1056456)

# Advanced CSV Importer

 作者：[Takayuki Miyauchi](https://profiles.wordpress.org/miyauchi/)

[下载](https://downloads.wordpress.org/plugin/advanced-csv-importer.0.1.6.zip)

 * [详情](https://cn.wordpress.org/plugins/advanced-csv-importer/#description)
 * [评价](https://cn.wordpress.org/plugins/advanced-csv-importer/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/advanced-csv-importer/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/advanced-csv-importer/#developers)

 [支持](https://wordpress.org/support/plugin/advanced-csv-importer/)

## 描述

The Advanced CSV Importer will import the following content from a CSV file.

Advanced CSV Importer is fully unit-tested. The plugin is stable and ready to be
used in large projects like enterprise applications.

 * Posts, pages and other custom post types
 * Custom fields and post meta
 * Categories, tags

https://github.com/miya0001/advanced-csv-importer

This plugin requires PHP 5.3 or later.

#### Default CSV field names

 * ID
 * post_content
 * post_name
 * post_title
 * post_status
 * post_type
 * post_author
 * ping_status
 * post_parent
 * menu_order
 * to_ping
 * pinged
 * post_password
 * guid
 * post_content_filtered
 * post_excerpt
 * post_date
 * post_date_gmt
 * comment_status
 * post_category
 * tags_input
 * page_template

You can change field name via `acsv_post_object_keys` hook like following.

    ```
    add_filter( 'acsv_post_object_keys', function( $post_object_keys ){
        $post_object_keys['title'] = 'post_title';
        $post_object_keys['content'] = 'post_content';
        return $post_object_keys;
    } );
    ```

Other columns will be saved to the custom field.

There is a sample of the CSV.

  |   |  ID |  post_name |  post_author |  post_date |  post_type |  post_status |  post_title |  post_content |  post_category |  tags_input |  custom_field |  
   |   |   |  Import-test |  admin |  2013/9/13 0:00 |  post |  publish |  CSV Import Test |  This is a post for csv import.
 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |  fruits |  apple,banana |  this is custom field value. |  
 |   |   |   |  editor |   |  post |  publish |  define author test |   |   |   |   |  
 |   |   |   |  2 |   |  post |   |  define author id test |   |   |   |   |  
 |   |  1 |  Hello-world-updated |   |   |  post |   |  Hello world! Updated! |  Welcome to WordPress. This is your first post. Updated by RS CSV Importer! |   |   |   |

 [view raw](https://gist.github.com/miya0001/06f1a8e2bf1789c7ddee/raw/3c95de96302f556e58049e550f9a14b047048dbe/test.csv)

[ test.csv  hosted with ❤ by [GitHub](https://github.com)

#### Action Hooks

 * acsv_after_insert_post

#### Filter Hooks

 * acsv_post_object_keys
 * acsv_post_defaults
 * acsv_import_upload_size_limit
 * acsv_pre_get_post_objects
 * acsv_after_get_post_objects
 * acsv_csv_format
 * acsv_csv_to_hash_array
 * acsv_get_user_by_field

#### WP-CLI

Importing:

    ```
    $ wp csv import tests/_data/wp/sample.csv
    +------+-----------------------+------+---------+------------+---------------------+
    | ID   | Title                 | Type | Status  | Author     | Date                |
    +------+-----------------------+------+---------+------------+---------------------+
    | 1720 | CSV Import Test       | post | publish | admin      | 2013-09-13 00:00:00 |
    | 1721 | define author test    | post | publish | admin      | 2014-12-27 18:44:46 |
    | 1722 | define author id test | post | publish | themedemos | 2014-12-27 18:44:46 |
    | 1    | Hello world! Updated! | post | publish | admin      | 2014-12-27 18:44:46 |
    +------+-----------------------+------+---------+------------+---------------------+
    ```

History:

    ```
    $ wp csv log
    +----------+-----------------------------+---------------------+---------+---------+
    | ID       | Title                       | Date                | Success | Failure |
    +----------+-----------------------------+---------------------+---------+---------+
    | e0a66344 | Imported from WP-CLI.       | 2014-12-27 18:44:46 |       4 |       0 |
    | 43c47af6 | Imported from admin screen. | 2014-12-27 16:53:17 |       4 |       0 |
    | df0f140b | Imported from WP-CLI.       | 2014-12-27 16:21:42 |       4 |       0 |
    +----------+-----------------------------+---------------------+---------+---------+
    ```

Details of the history:

    ```
    $ wp csv log e0a66344
    +------+-----------------------+------+---------+------------+---------------------+
    | ID   | Title                 | Type | Status  | Author     | Date                |
    +------+-----------------------+------+---------+------------+---------------------+
    | 1720 | CSV Import Test       | post | publish | admin      | 2013-09-13 00:00:00 |
    | 1721 | define author test    | post | publish | admin      | 2014-12-27 18:44:46 |
    | 1722 | define author id test | post | publish | themedemos | 2014-12-27 18:44:46 |
    | 1    | Hello world! Updated! | post | publish | admin      | 2014-12-27 18:44:46 |
    +------+-----------------------+------+---------+------------+---------------------+
    ```

## 屏幕截图

 * [[
 * Tools Import Screen
 * [[
 * The result of an importing
 * [[
 * History of importing

## 安装

This section describes how to install the plugin and get it working.

e.g.

 1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Place `<?php do_action('plugin_name_hook'); ?>` in your templates

## 评价

![](https://secure.gravatar.com/avatar/0cd449c259c343abf442c1898a86168e174d56394a044b62499bfd7dade14e2f?
s=60&d=retro&r=g)

### 󠀁[great plugin](https://wordpress.org/support/topic/great-plugin-7989/)󠁿

 [pharefm](https://profiles.wordpress.org/pharefm/) 2016 年 9 月 3 日

Nice simple plugin that does what it says. Could use a few extra options without
requiring the user to add/edit code.

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/advanced-csv-importer/reviews/)

## 贡献者及开发者

「Advanced CSV Importer」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Takayuki Miyauchi ](https://profiles.wordpress.org/miyauchi/)
 *   [ DigitalCube Inc. ](https://profiles.wordpress.org/megumithemes/)

[帮助将「Advanced CSV Importer」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/advanced-csv-importer)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/advanced-csv-importer/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/advanced-csv-importer/)，或通过[RSS](https://plugins.trac.wordpress.org/log/advanced-csv-importer/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/advanced-csv-importer/)。

## 更新日志

#### 0.1.0

 * Initial release.

## 额外信息

 *  版本 **0.1.6**
 *  最后更新：**11 年前**
 *  活跃安装数量 **30+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **4.2.39**
 *  语言
 * [English (US)](https://wordpress.org/plugins/advanced-csv-importer/)
 * 标签
 * [csv](https://cn.wordpress.org/plugins/tags/csv/)[import](https://cn.wordpress.org/plugins/tags/import/)
   [wp-cli](https://cn.wordpress.org/plugins/tags/wp-cli/)
 *  [高级视图](https://cn.wordpress.org/plugins/advanced-csv-importer/advanced/)

## 评级

 4 星（最高 5 星）。

 *  [  0 条 5 星评价     ](https://wordpress.org/support/plugin/advanced-csv-importer/reviews/?filter=5)
 *  [  1 条 4 星评价     ](https://wordpress.org/support/plugin/advanced-csv-importer/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/advanced-csv-importer/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/advanced-csv-importer/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/advanced-csv-importer/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/advanced-csv-importer/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/advanced-csv-importer/reviews/)

## 贡献者

 *   [ Takayuki Miyauchi ](https://profiles.wordpress.org/miyauchi/)
 *   [ DigitalCube Inc. ](https://profiles.wordpress.org/megumithemes/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/advanced-csv-importer/)