How to import and export taxonomy terms

Ever had the need to move a taxonomy list from one Drupal site to another? Instead of re-entering all the terms why not try the Taxonomy Import/Export via XML module. Even though the module name is "via XML" it actually supports XML, CSV and a couple of other formats. To keep things simple we’ll stick to XML.

Before we get started go to http://drupal.org/project/taxonomy_xml and download the module and place it in sites/all/modules.

Then enable at Administer >> Site building >> Modules.

Once the modules installed exporting a taxonomy as XML is fairly straight forward.

Exporting

Go to Administer >> Content management >> Taxonomy. Click on the export tab, and then click on the name of the vocabulary that you want to export and download the XML file.

tax_xml_fig1.png

Importing

When you are ready to import the XML. Go to Administer >> Content management >> Taxonomy and click on import.

First select the right Target vocabulary depending on if you are adding new terms or updating an old one.

Below select “upload file” from data source and find your xml file. Once you have selected the right XML file click on Import.

tax_xml_fig2.png

Now just double check that the terms were actually importing.

That’s all, if you have any questions just leave a comment.

Comments

Anonymous's picture

hello
do you think that this could be integrated with features.module ?

I had read some time ago that they were missing a way to export/import tags yet...

Sincerely,

Jonathan

Anonymous's picture

Didn't know about the module, thanks for the article! Will keep in mind for when the time comes =)

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <pre> <h2> <h3>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options