Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hello i have a Content Type that has been using a body field. Now i was wanting to use a CCK text field instead. Is there a way i can convert existing node body fields for this content type to my new cck field?


(drupal 6)

share|improve this question
up vote 1 down vote accepted

Three options spring to mind:

  1. Views Bulk Operations. Safest if the amount of nodes to convert is manageable. You'll probably need to use custom PHP to make the conversion happen though, as the ready-made functionality won't cut your demands.
  2. Custom script where you load each node to be converted, modify the structure and run node_save().
  3. SQL query, either pure SQL or by custom Drupal (Drush) script. First create your content type, then see the database structure. Then select the body text from the table node_revisions and insert it into your field value column for each node.
share|improve this answer
thanks kekkis. I use VBO but i wont be able to make the custom PHP so as you can guess that makes 2 not an option either for me. Ive messed about with the db before so maybe 3 would work. I have my content type 'vids' when i look in node_revisons table there doesnt seem to be a way to sort by content type. errrr – Reg Gordon Dec 29 '12 at 23:31
You have to join the node table to get the content type information: INNER JOIN node n ON nr.vid = n.vid where nr is the alias for node_revisions. – kekkis Dec 30 '12 at 11:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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