CSV import to wordpress

I found a script which can import csv file to wordpress. Thanks Zack for posting the original csv import script. I asked a programmer to modify the script(I am not a coder anyway :-)). Here are the changes:

  • tags support
  • multiple categories in one column

CSV sample:

wp_title|wp_post_date|wp_category|wp_content|wp_tags|field1|field2|field3….

title1|2008-05-14 23:59:59|cat1,cat2|long text content|tags1,tags2,tags3|extra field|some extra fields|other extra fields

Please use Category Slug in the csv file.

You can get the script here

12 Responses to “CSV import to wordpress”

  1. Ludo Says:

    Thank you very much for this release.

    Also, can you tell me how the header of the CSV file much look like ?
    specialy for the tags..
    Is it tag | tag | tag | or tag1 | tag2 | tag3 … ?
    Is the rest of the header is the same of the older version ?

    thank you very much again

    Ludo

  2. admin Says:

    The header is like:

    wp_title|wp_post_date|wp_category|wp_content|wp_tags|field1|field2|field3….

    If you have multiple categories and tags, just separated by commas.

  3. bali Says:

    May I change like this :
    wp_title|wp_category|wp_content|wp_tags|field1|field2|field3|wp_post_date

  4. admin Says:

    Actually, I didn’t try that. But I think it’s better follow the sequence.

  5. Max Says:

    Hi,

    I’d like to import All-in-one SEO title, keywords, description using csv2post. How would I do it? Is this the correct way?

    wp_content|Title:|…….
    test content|My first SEO title|….

    Please help

  6. huski Says:

    wordpress 2.6

    i placed it into my wp-admin/import directory and receive the following error when clicking on the menu Import. not getting to the script.

    Fatal error: Cannot redeclare class CSV_Import in /home/santabar/public_html/directory/wp-admin/import/csv.php on line 29

  7. huski Says:

    wooops, have to take out the original csv.php or overwrite it…

    works sweet !

  8. huski Says:

    How to hide the tags from being displayed in the post. When importing, the wp_tags are added to the database, however they are visible. But when manually creating a post, the tags are hidden (which is much needed). Help !

  9. admin Says:

    Max, you you can import all in one seo data. Here is an example of my import file. As you can see, title|description|keywords are fields for All in one SEO.

    wp_title|wp_post_date|wp_category|wp_content|wp_tags||title|description|keywords|file_format…..

  10. admin Says:

    huski, you need to run the script under Manage –> import –> csv

    As for your question whether the tags is visible or not, I think it depends on your theme. You can edit your theme to make tags visible or hidden.

  11. bob Says:

    Hi,

    thanks for sharing this.

    I uploaded csv.php into the plugins folder of my wordpress theme,
    so now it’s in:

    /wp-content/plugins/csv.php

    but the plugin doesn’t show up in my plugin list, so I can’t even activate it.

    How can I fix this?
    I’m using WP 2.6.2

    Thank you!

  12. admin Says:

    Bob,

    Put it in wp-admin/import/

Leave a Reply