How can i export only comments from a Drupal Site (Live) to a Drupal site (Dev).

The content of both sites is same. The live site only has new users and comments. I already exported the users and imported into Dev Site.

I looked into many modules but non on them only allow comments to be exported. Can i simply copy some MySql tables ?


1 Answer 1


Assuming you are using Drupal 7.

Use the Views module and create a table view of node comments.

Add fields: Node ID (nid), Comment ID (cid), Comment Title, Comment Body, Commment Author, Created Date.

For export, use Views Data Export and export the CSV file.

For import, use the Feeds module + Feeds Comment Processor and import your CSV.

Checkout this Feeds Video Tutorial (this is for nodes, not comments, but it will give you an idea on how feeds with the CSV import works).


Exporting MySQL tables approach:

Never done it like this, but if I were you, I would look for all the tables that have the name comment, export those and import.

Note sure if it will work as simply as that, but worth a try.

  • perfect, works like a charm. (y)
    – brainHax
    Jan 4, 2016 at 9:54
  • @brainHax just wondering, which method did you use?
    – No Sssweat
    Jan 4, 2016 at 10:07
  • the first one. Views , feeds and data export.
    – brainHax
    Jan 4, 2016 at 14:16
  • What about Drupal 8?
    – Progonat
    Oct 3, 2019 at 21:19
  • @Progonat you'll need to use the Migrate API. I highly suggest you watch youtube videos about it, it can be hard to grasp from just reading the docs.
    – No Sssweat
    Oct 4, 2019 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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