Select one or more tags, then press “Search Plugins”

Find Plugin with any / all of the selected criteria
Search Plugin

Miller Media CSV Importer Wordpress Plugin - Rating, Reviews, Demo & Download

Miller Media CSV Importer Wordpress Plugin - Rating, Reviews, Demo & Download
No ratings yet
Free
Follow for free plugins, new theme releases and theme news

Plugin Description

This plugin is a maintained fork of Really Simple CSV Importer originally created by Takuro Hishikawa. We are grateful for his work and his blessing to continue this project.

Miller Media CSV Importer adds a “Miller Media CSV Importer” item to Tools Import. Upload a CSV file and the plugin creates or updates posts, pages, or any custom post type, along with categories, tags, custom taxonomies, featured images, and custom fields (including Advanced Custom Fields, Custom Field Suite, and Smart Custom Fields).

Features

  • Create new posts/pages/custom post types, or update existing ones by ID or title
  • Category, tag, and custom taxonomy support
  • Custom field (post meta) support, including bulk-mapped columns
  • Advanced Custom Fields support
  • Custom Field Suite support
  • Smart Custom Fields support
  • Featured image / attachment import from a local path or a remote URL
  • Filter and action hooks so developers can customize every step of the import
  • PHP 8.1+ and WordPress 7.1 compatible

How to Use

1. Prepare your CSV file

  • Save the file as UTF-8 encoded CSV.
  • Use a comma (,) as the field delimiter.
  • Quote every text cell (most spreadsheet applications, such as LibreOffice or Excel, do this automatically when you export as CSV).
  • The first row must be a header row containing the column names described below.

2. Upload and import

  1. Go to Tools Import Miller Media CSV Importer.
  2. Choose your CSV file and, if you want existing posts with a matching title to be updated instead of duplicated, enable “Replace by post title” under Import Options.
  3. Click “Upload file and import”.
  4. The plugin processes each row and reports the result (created, updated, or any error) directly on the screen.

Empty cells mean “leave the existing value alone”, not “delete it”.

Column reference

Only post_type is required. Every other column is optional – include only the ones you need.

  • post_type – (required) The post type slug (e.g. post, page, or any custom post type). Must already be registered.
  • ID or post_id – (int) ID of an existing post to update. If the ID does not exist yet, a new post is created using that ID. If omitted entirely, a new post is created with the next available ID.
  • post_title – (string) The post title.
  • post_name – (string) The post slug.
  • post_author – (login or ID) The user login or user ID of the author. Left unset (defaults to the current user) if the given user cannot be found – for example when a CSV exported from another site references a user that does not exist on this one.
  • post_author_login – (string) Alternative way to specify the author by user login.
  • post_date – (string) The publish date, e.g. 2024-01-31 10:00.
  • post_date_gmt – (string) The publish date in GMT.
  • post_status – (string) publish, draft, pending, future, private, or any custom registered status. Defaults to draft. If you use future, you must also provide post_date.
  • post_password – (string) Password to protect the post (max 20 characters).
  • post_content – (string) The full post content.
  • post_excerpt – (string) The post excerpt.
  • post_parent – (int) The parent post ID. Used for hierarchical post types such as pages.
  • menu_order – (int) Numeric menu order.
  • comment_status – (string) open or closed.
  • post_category – (string, comma separated) Category slugs. Categories that do not exist yet are created.
  • post_tags – (string, comma separated) Tag names.
  • tax_{taxonomy} – (string, comma separated) Term names or slugs for an existing custom taxonomy. For example tax_actors imports values into the actors taxonomy, which must already be registered. Names of terms that don’t exist are created.
  • post_thumbnail – (string) A URL or server path of an image. The image is imported into the Media Library and set as the post’s featured image.
  • cfs_{field} – (string) Value for a Custom Field Suite field, e.g. cfs_color.
  • scf_{field} – (string) Value for a Smart Custom Fields field, e.g. scf_text.
  • field_xxxxxxxxxxxxx – (string) An Advanced Custom Fields field key (starts with field_). The value is saved with ACF’s update_field() so field-specific formatting is respected.
  • Any other column name – (string) Imported as a plain custom field (post meta), using the column name as the meta key.

Note: To set the page template of a page, use the custom field key _wp_page_template.

Minimal sample CSV

"post_title","post_type","post_status","post_content"
"My First Import","post","publish","Hello from the CSV importer!"

A fuller example, plus several ready-to-use files covering categories/tags, custom fields, custom taxonomies, pages, dates, and attachments, are bundled with the plugin in its sample/ directory (for example wp-content/plugins/miller-media-csv-importer/sample/sample.csv), and the main one is linked directly from the importer screen.

How to Customize Import Post Data (for developers)

There are several filters available, all kept under their original really_simple_csv_importer_* names for backward compatibility with existing add-ons.

really_simple_csv_importer_save_post

Applied to post data before it is saved.

Parameters:

  • $post – (array)(required) post data
  • $is_update – (bool) whether this is an update of an existing post, or a new insert

Example:

function really_simple_csv_importer_save_post_filter( $post, $is_update ) {

    // remove specific tag from import data
    if (isset($post['post_tags'])) {
        $_tags = array();
        foreach ($post['post_tags'] as $tag) {
            if ($tag != 'Apple') {
                $_tags[] = $tag;
            }
        }
        $post['post_tags'] = $_tags;
    }

    return $post;
}
add_filter( 'really_simple_csv_importer_save_post', 'really_simple_csv_importer_save_post_filter', 10, 2 );

really_simple_csv_importer_save_meta

Applied to post meta (custom field) data.

Parameters:

  • $meta – (array)(required) post meta data
  • $post – (array) post data
  • $is_update – (bool)

Example:

function really_simple_csv_importer_save_meta_filter( $meta, $post, $is_update ) {

    // serialize metadata
    $meta_array = array();
    if (isset($meta['meta_key_1'])) $meta_array[] = $meta['meta_key_1'];
    if (isset($meta['meta_key_2'])) $meta_array[] = $meta['meta_key_2'];
    $meta = array( 'meta_key' => $meta_array );

    return $meta;
}
add_filter( 'really_simple_csv_importer_save_meta', 'really_simple_csv_importer_save_meta_filter', 10, 3 );

really_simple_csv_importer_save_tax

Applied to custom taxonomy data (categories and tags are post data, not included here).

Parameters:

  • $tax – (array)(required) post taxonomy data
  • $post – (array) post data
  • $is_update – (bool)

Example:

function really_simple_csv_importer_save_tax_filter( $tax, $post, $is_update ) {

    // Fix misspelled taxonomy
    if (isset($tax['actors'])) {
        $_actors = array();
        foreach ($tax['actors'] as $actor) {
            if ($actor == 'Johnny Dep') {
                $actor = 'Johnny Depp';
            }
            $_actors[] = $actor;
        }
        $tax['actors'] = $_actors;
    }

    return $tax;
}
add_filter( 'really_simple_csv_importer_save_tax', 'really_simple_csv_importer_save_tax_filter', 10, 3 );

really_simple_csv_importer_save_thumbnail

Applied to the thumbnail URL/path before it is fetched and attached.

Parameters:

  • $post_thumbnail – (string)(required) the thumbnail file path or remote URL
  • $post – (array) post data
  • $is_update – (bool)

Example:

function really_simple_csv_importer_save_thumbnail_filter( $post_thumbnail, $post, $is_update ) {

    // Import a local file from an FTP directory
    if (!empty($post_thumbnail) && file_exists($post_thumbnail)) {
        $upload_dir   = wp_upload_dir();
        $target_path  = $upload_dir['path'] . DIRECTORY_SEPARATOR . basename($post_thumbnail);
        if (copy($post_thumbnail, $target_path)) {
            $post_thumbnail = $target_path;
        }
    }

    return $post_thumbnail;
}
add_filter( 'really_simple_csv_importer_save_thumbnail', 'really_simple_csv_importer_save_thumbnail_filter', 10, 3 );

really_simple_csv_importer_dry_run

Return true from this filter to parse the file and show results without actually writing anything to the database.

really_simple_csv_importer_class

Return the name of a class (already loaded, with a save_post( $post, $meta, $tax, $post_thumbnail, $is_update ) method) to completely replace the default save routine. See the add-on development example.

How to Customize the Post Data After Importing (for developers)

really_simple_csv_importer_post_saved

Action fired with the imported WP_Post object right after each row is saved, so you can run follow-up tasks (e.g. download a remote image into a custom field – see this gist).

How to Debug Import Data

Really Simple CSV Importer Debugger add-on (a separate, optional tool from the original plugin’s author) enables dry-run testing and shows detailed post/meta/taxonomy data for each CSV row before it’s saved. Download from gist.

Localizations

The plugin ships with translations for: French (fr_FR), Japanese (ja), Spanish (es_ES), German (de_DE), Chinese Simplified (zh_CN), Portuguese – Brazil (pt_BR), Italian (it_IT), Russian (ru_RU), Polish (pl_PL), Dutch (nl_NL), Turkish (tr_TR), and Swedish (sv_SE), in addition to English.

Credits

Screenshots

No screenshots provided


Reviews & Comments