3

I'm using Drupal 6.x on a site that has many users. There are about 20 "Pro" users that function as authors. I need to export an individual author's posts in order to later import them into WordPress. What might be the easiest way to accomplish this?

Bonus! I also need to export the comments associated with each article, AND change all comment authors to "Anonymous." Should I do that after the export through SQL, or is there an easier way?

I am looking into the Views module, but it's pretty far over my head... I would certainly prefer a simpler solution if that is possible.

Thanks for the help in advance!

  • I am also concerned about how to export the images that are associated with each post... – minttoothpick Sep 4 '12 at 11:51
1

Views module is the only solution which makes your task very easy.

1.Simply create a view and add the necessary fields you want to export.

2.Add a display (data export).

3.In DATA EXPORT SETTINGS name your path with .csv extension example data.csv

Finally call the path on your browser. That's it

Another difficult way is to write queries and then create a php code to export the result to csv

  • Thanks for the suggestion, @Rama... Hopefully I'll get it to work. I appreciate you giving a little walk through rather than just saying "use Views!" – minttoothpick Sep 4 '12 at 10:49
  • It's with pleasure. Let me know if any more doubts. – Ramaraju.d Sep 4 '12 at 13:35
  • So I am able to get a decent output of the user's post nodes, but I can't figure out how to use Views' advanced options such as "Relationships" in order to get all the comments related to each post. For example, I am taking the fields I need and filtering them by "User X" as author; that gets me this one person's content, but how can I grab the comments, too? Also, any tips for exporting images from the posts? – minttoothpick Sep 5 '12 at 12:26
  • If you want to export images using views, you may get only the path to the image . Generally you can see the path in your database with table name file_managed. – Ramaraju.d Sep 5 '12 at 15:36

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.