13

I am struggling with it, but I can't do it by myself. Google doesn't gave me links for tutorials other modules doesn't help me too.

I would like to export content types definition from Drupal site to another.

Could someone give me any hint how to do it?

1
  • Why is this question too broad?
    – devunder
    Mar 11, 2019 at 11:09

1 Answer 1

23

Sure,

Install the features module and then you go to structure -> features

Click on "create new feature"

Give it a name and then on Edit component you can select what you want to export. Select Content-type: node and you will see a list of all your content types, check the content types you want to export,( when you click the checkbox, you will see the ajax image wait till it disappear) and then click on download feature. Version 7.x-2.x has got a better UI and it's possible to download it straight into your sites/all/modules/features folder if you give web server permission to write into that folder.

The feature you downloaded works like a module so upload the folder you downloaded into sites/all/modules/features, go to you module page and enable it.

You will find your content type with all the fields.

I suggest you to play with features module to understand all his potential.

4
  • Thanks a lot. I did it, but now my question is if I enable this module in target website if my content types will be imported?
    – Codium
    Aug 9, 2012 at 13:27
  • Yes, your content type will be imported with all the fields. Aug 9, 2012 at 13:36
  • Besides you can use Migrate module to export/import any type of data not only content types. But that didn't work for me when migrating between D6 and D7.
    – Hardoman
    Aug 26, 2018 at 0:18
  • Features is a great module. It worked for my D6 -> D7 migration while the others didn't (Migrate gave error nodewords_migrate_api supports Migrate API version 1, Migrate module API version is 2 - migration support not loaded). Features allows to export any data types. Note: if you want to migrate data between 6 and 7 versions, and create feature in D6, you won't be able to enable it as module in D7. Nevertheless if you go to /admin/build/features you still will be able to enable your feature from there!
    – Hardoman
    Aug 26, 2018 at 1:40

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