Title: knarrff's Replies | WordPress.org

---

# knarrff

  [  ](https://wordpress.org/support/users/knarrff/)

 *   [Profile](https://wordpress.org/support/users/knarrff/)
 *   [Topics Started](https://wordpress.org/support/users/knarrff/topics/)
 *   [Replies Created](https://wordpress.org/support/users/knarrff/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/knarrff/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/knarrff/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/knarrff/engagements/)
 *   [Favorites](https://wordpress.org/support/users/knarrff/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Does CSV Importer import comments?](https://wordpress.org/support/topic/does-csv-importer-import-comments/)
 *  [knarrff](https://wordpress.org/support/users/knarrff/)
 * (@knarrff)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/does-csv-importer-import-comments/#post-1345713)
 * Thank you. It’s nice to know own code being used by others.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CSV Importer] [Plugin: CSV Importer] speed problems](https://wordpress.org/support/topic/plugin-csv-importer-speed-problems/)
 *  [knarrff](https://wordpress.org/support/users/knarrff/)
 * (@knarrff)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-csv-importer-speed-problems/#post-1600649)
 * It’s difficult to say something with that little information.
 * Something you can try right away is to import some of the small examples distributed
   with the importer. They should not take long. If they do I would suspect a problem
   with the hosting. If they are fast but your csv files are not it would be interesting
   to see an example of your files to see if either them or the importer could be
   improved.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Does CSV Importer import comments?](https://wordpress.org/support/topic/does-csv-importer-import-comments/)
 *  [knarrff](https://wordpress.org/support/users/knarrff/)
 * (@knarrff)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/does-csv-importer-import-comments/#post-1345709)
 * For illustration, here is the header I used (shortened to a maximum of three 
   comments, but you get the idea…):
 * [Large code excerpt removed by moderator. Per forum rules, please use [the pastebin](http://wordpress.pastebin.com/)
   for all large code excerpts. It works better anyway.]
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Does CSV Importer import comments?](https://wordpress.org/support/topic/does-csv-importer-import-comments/)
 *  [knarrff](https://wordpress.org/support/users/knarrff/)
 * (@knarrff)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/does-csv-importer-import-comments/#post-1345708)
 * I have sent you the patch. It is not that big actually, but I am also not 100%
   happy with it. However, it worked for me, so I don’t have a direct reason to 
   improve upon it anymore.
 * The reason why I am not really happy has to do with the way comments have to 
   be specified – but that is inherent to the problem: Comments belong to Posts.
   The only easy way to connect a comment to a post in _one_ csv file I could find
   is to write the comment data on the same line as the post data. Now this has 
   some problems:
    - Data for one comment consists of multiple fields, but multiple comments are
      possible as well. This means that there has to be some comment id in the headers.
      This id doesn’t go into wordpress. It is only there to have the connection
      information in the csv file.
    - The number of comments per post can be quite different from post to post. 
      However, there has to be one header for each possible comment. This means 
      you have to know (or guess) a number equal or greater than the maximum number
      of comments for any given post, and generate all of those headers. This was
      not a big problem for me, as I did do that import once and that number was‘
      only’ 17.
    - Even when a post doesn’t have that maximum number of comments, or not even
      a single comment, the post line has to contain a lot of empty fields, otherwise
      the whole post doesn’t import. That seems to be a limitation of the csv-reader.
      However, that’s also not a big issue because it is easy to add a lot of commas
      to the end of each line in the csv file. There seems to be no problem adding
      more of them than needed.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Does CSV Importer import comments?](https://wordpress.org/support/topic/does-csv-importer-import-comments/)
 *  [knarrff](https://wordpress.org/support/users/knarrff/)
 * (@knarrff)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/does-csv-importer-import-comments/#post-1345706)
 * I just extended the exporter to handle comments as well, to some extend. If there
   is interest I would be happy to share this, in the hope it will be part of a 
   future release of cvs_importer.

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