Question

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 ?

thanks

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top