I have a content type named "event_xyz" that I want to rename to "event". I figure I can clone the content type and then delete the original. But I don't see any tuts or modules on how to do this.

Alternatively, is there a way to rename a bundle's machine name?

I found a closed question related to cloning content types for Drupal 7, but not for Drupal 8.

  • 1
    have you try to export the entity config and change the id and name inside this config for this content type ?
    – Kevin
    Commented Jun 21, 2017 at 15:41
  • Let me try that.
    – oknate
    Commented Jun 21, 2017 at 15:43
  • but you ll have some work, you need to export field, field storage change mapping...
    – Kevin
    Commented Jun 21, 2017 at 15:50
  • 1
    It seems to have worked, see my answer.
    – oknate
    Commented Jun 21, 2017 at 15:58

6 Answers 6


Here's one solution to rename a content type using Kevin's suggestion.

1) search and replace in the codebase for "event_xyz"

2) go to /config/sync directory (or where your configs are)

3) run command to search and replace in filenames

4) delete content type "event_xyz"

5) run config import ("drush cim -y")

This worked and took less than ten minutes, although I didn't have to delete any content.

  • And if you want to use this method without deleting the original content type, you can make copies of all relevant config files (content type, fields, entity view displays, entity form display, etc.), change every instance of the old content type name, and import them at /admin/config/development/configuration/single/import without the UUID line. Then the Convert Bundles module will work to convert any desired content to the new type. Commented Jul 21, 2019 at 17:51

The best way to do this is the entity_clone contrib module. I downloaded it, installed it, hit the clone button and all of fields and form settings were copied to the new content type. It worked very well.

  • 2
    Not sure why all the up votes for this.. Entity Clone does exactly what it suggests - it clones entities; not bundles/content types/entity types which is what this question is asking.
    – liquidcms
    Commented May 18, 2021 at 1:16
  • Reread the documentation: it partially supports cloning config entities such as Content Types.
    – oknate
    Commented May 18, 2021 at 13:10
  • Yes, I stand corrected. Not well named or well documented; but Entity Clone does partially clone some/all entities (I used it to clone Message Notify templates); but it didn't clone the fields with it. But using Field Tools did that part nicely.
    – liquidcms
    Commented May 20, 2021 at 3:27

You can use Content Type Clone designed specifically for this task. It's available for Drupal 7 and Drupal 8: https://www.drupal.org/project/content_type_clone


now you can use in drupal 8 Entity Type Clone.

Entity Type Clone allows Administrator to clone Content types, Paragraphs, and Vocabularies. These will be used in creating an additional entity type with the existing one. You can clone entity type along with the Form and View modes.

enter image description here


Best way to do this in my opinion is through the config import approach.

Here's a step by step guide:

  1. Search for your content type's name in your config folder:

enter image description here

  1. Copy all these config files to a new folder.
  2. Open up your new folder in your favorite IDE and do a search/replace for your old/new content type names:

enter image description here

  1. Delete the uuid line from every config file, since this uuid is already associated with a different, existing config record:

enter image description here

  1. Back to your folder (from the OS view), update the config file names by replacing the old content type name with the new one:

enter image description here

  1. Import config from this folder using the following command:

drush cim --partial --source=/path/to/your/new/config/folder

  1. Voilà! You should now have your content type perfectly duplicated!

For D7, you can use Node Convert. Build a fresh content type, with fields new/same/similar then use field mapping (field matching) to move/migrate them. Maybe or maybe not with Views Bulk Operations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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