• Enormously useful plugin. Thanks for sharing.

    I was wondering if there’s any way to use it for updating or appending to existing posts. I forgot some custom fields on my first upload and couldn’t figure out any alternative other than deleting everything and starting from scratch.

    Also, as a request for future versions, is it possible to make this work with custom taxonomies?

    http://ww.wp.xz.cn/extend/plugins/csv-importer/

Viewing 5 replies - 1 through 5 (of 5 total)
  • YMO: No, there is currently no way to update or append to existing posts. I would delete all the imported posts, add missing custom fields and re-import all of the posts, too. Is there anything wrong with this approach?

    Could you elaborate on how the plugin should work with custom taxonomies?

    Thread Starter ymo

    (@ymo)

    If you have a small number of posts, deleting and starting over might be okay, but if it’s anything in quantity it would be nice to be able to overwrite based on a unique identifier (perhaps a key given in the initial upload).

    As an example, let’s say you make posts for each of Amazon’s best sellers. The body of the post is a book description, custom field is position on the charts. The book description wouldn’t change, but where it ranks on the best seller list could. Instead of deleting all of the posts about each book – everything else would still be accurate, it would be nice to be able to update that custom field (or maybe just the post body to keep things simple). In a more generic situation, perhaps you’d want to update all posts in the “Non-fiction bestsellers” category without going through each post one at a time.

    If a custom taxonomy ID or name could be defined similar to how categories can be defined, it would open so many possibilities.

    Example: one custom taxonomy is “Author Name”. If you could match one of the fields to the custom taxonomy “author_name” or “book_publisher” – or whatever the taxonomies are, instead of “post_tag” (default), you could then use the custom taxonomies to let people browse/search for posts about books where Author is X and Publisher is X.

    YMO: Okay, I can see how updating posts instead of deleting and re-importing can be convenient. But I think that CSV Importer is simply the wrong tool for the job. What you need is not a tool to import content, which is sort of a one time procedure, but a kind of CMS built on top of WordPress that keeps all of it’s data in CSV file(s). Different paradigm, I’m afraid. True, you could pile this up on top of CSV Importer, but I seriously doubt that it could be both general-purpose and pretty. I’ll definitely consider implementing something like this, though.

    I had to read about custom taxonomies first, and sure, this will probably be in the next release.

    Thread Starter ymo

    (@ymo)

    I should have referenced that post – it’s exactly the one I read to understand how useful custom taxonomies could be.

    For the updating, I think it could be a different tool, but could be really great here (I’m not trying to be pushy – this has been more helpful than the one paid plugin I tried for the same purpose, and I appreciate the time you’ve spent on it as well as your responses). Here’s another situation: a large file times out in the middle of uploading. Instead of having to split into lots of smaller files, if there were a unique key for each entry (could be a custom field) the import could pick up or overwrite from where it cut out without duplicates. If I have an existing post with the ID CSVI50, a future upload with that same ID would overwrite the information instead of adding a new post.

    The custom field update was a bad example. Right now, I make changes in bulk directly through SQL queries, and even just updating one field means including the information from the other fields (title, body, excerpt, etc), so it makes sense that trying to update only one part of a post would be beyond the scope of the plugin. But the ability to overwrite posts in bulk – in their entirety not just one field, using a custom key as unique identifier would be great for updates and timeouts. In the first example, it would mean re-uploading all of the post content in addition to whatever was different/changed. At least that’s how I’m thinking of it, but you’d know better than I would if it would work in practice.

    YMO: Don’t worry, you’re not being pushy. For the most part, user feedback is what keeps me developing the plugin.

    I really don’t know how likely your time out scenario is, but I think many users would indeed appreciate the ability to update posts. At first, I thought that including a unique identifier for each row in your CSV file was a bit complicated for users when you can just delete and reupload. You can also get unexpected results if the id is not really unique. Thinking about it now, it might work as an optional feature.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: CSV Importer] Updating/appending posts’ is closed to new replies.