0

I'm working with a client to move their content from a custom CMS to WP. They've sent me this csv to work from.

https://dl.dropboxusercontent.com/u/54924720/TOTD_SCRAPE_TAKE1_.csv

The only csv to WP imports I've done in the past have come from other WP installs. I have several questions.

  1. Can I use the content of these fields in the shape they're in now? Will I need to have them resend with the content as text in the fields without the HTML? Much of the HTML is formatting - it would seem like we wouldn't to import that formatting in the post, but instead handle that formatting within the theme now. And, for example, the date is not in a format that I think WP will understannd.

  2. The comments - They have a comments column, but they also have comments showing in their "fullarticle" column. It's like the comments were scraped/exported with the content of the article. In order to import the commennts, won't I need fields for comment id, comment author, author link, etc... individually for each comment per post? Will importing the comments be part of the same CSV?

  3. Assuming that I can get the content IN the fields in a form that will work for the actual import, would I then take the csv they send and rename/map their existing fields to the appropriate WordPress fields, creating my custom post types and custom fields ahead of time so that I have all of those ids to use in the csv? Seems like it would be better to send them an example csv file of what I'll need and let them figure out an export or scrape to match.

0

Firstly it is always best to avoid HTML in your data especially divs. There is plenty CSS from what I can see and I'm guessing none of those styles would be used in the final blog. So it would result in a lot of inert code, not good practice and it is best to spend time getting that right now than having to fix it later.

There is a free edition of CSV 2 POST and Easy CSV Importer. Both plugins are to be upgraded again this year so they are well supported. They can create posts using any .csv file including yours as it is right now. However I recommend renaming the columns, removing spaces and special characters and uppercase.

As for comments. A separate file is advised, import them last and yes that file would need to have a pageid column. Other approaches are possible but add a little more complication.

As for data meant for custom fields. If you happen to have lists or media and they can be scraped individually. It is recommended. Even if you need to create columns named "imageone,imagetwo,imagethree,..." and so on. That allows the plugins to import images one at a time, creating proper Wordpress media but also handling them in any way we want. It is usually a big plus to create the media because it offers opportunity to use gallery plugins etc.

Same for lists, I think I seen one in the sample file. If possible add list items to the .csv only and not the ul li HTML. It means the data can be used in various ways during importing i.e. creating tags or even building better lists. The mentioned plugins can still extract keywords from the final content and create tags. But if the data is organized we can tell the plugins which columns we want included as tags rather than the extraction process which is less accurate and requires more processing.

Processing is a big issue if creating thousands of posts, especially on low cost hosting. Wordpress developers creating CSV importers apply measures to avoid the user causing themselves problems. Sometimes that protection can seem like a fault so developers never win. I have created a book site with one million books, easy. But only because there were no custom fields or media. These things that are advantages in a CMS like Wordpress are complications when mass importing. But complications worth dealing with properly and so I highly recommend to anyone reading this. To seek advice, get recommendations on their .csv file before building the live site and try various .CSV importers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.