Assume a whole lot of Lightning Components - some of them in use on Flexipages, some in use on Visualforce and some not in use at all.

Is there anything better than (foreach!) create a new Component with the desired name, copy everything manually from markup, controller, helper, style, docu, renderer, design, svg and than eventually delete the old one?

4 Answers 4


You can use dataloader and update records in the table "AuraDefinitionBundle" .The developerName is the field that needs to be updated.

Please note you need dataloader or workbench since the object is not accessible via apex

  • I'm getting an obscure FIELD_INTEGRITY_EXCEPTION error when I try to update just the DeveloperName of an AuraDefinitionBundle in API v40.0. To make sure the field name doesn't break any of the name field rules, I just deleted one of letters from the DeveloperName - same error. Anyone else have this issue? Commented Oct 26, 2017 at 20:10
  • 1
    @<Mohith Shrivastava> read your article about this, but I get an [object Object]: An unexpected error occurred. Please include this ErrorId if you contact support: 624622357-2036 (444998763) when trying to save the query change
    – smohyee
    Commented Oct 17, 2018 at 16:31

I just ran through this issue and found that renaming the files in a lightning component, plus all the controllers, is a huge pain. Especially if you are creating a managed package.

What I found to be the easiest was to provide a new label for the component via the design file. This will change the name presented in the UI and requires no file name or metadata changes.


<design:component label="A Better Name">

Lightning Component Bundle Design Resources


We can rename AuraComponents developer console.

Step 1: Run the following query: SELECT Id, DeveloperName, MasterLabel FROM AuraDefinitionBundle

Step 2: Edit the rows to fit the name you want.

Step 3: Click Save Rows.


I use SFDX in my company, and the best way that I found to rename a component is by following the below steps: eg.

Previous name = MyLazyName

Renamed to = MyActiveName

  1. In your IDE find all the places where MyLazyName occurs. (child comps, action overrides, Layouts, flexi pages)
  2. Go to your (browser)scratch org, and remove all of the references of this component. (Not by IDE or sfdx:force:source:push)
  3. In your folder system, go to force-app/main/default/aura/MyLazyName Rename all sub components to MyActiveName.cmp, MyActiveNameController.js, etc.
  4. Also in your IDE, replace all references found in point 2, to MyActiveName. (eg. c:MyActiveName)

  5. Do sfdx:force:source:push.

  6. If it is successful, verify that things still work good.

  7. From the remote scratch org, go to Dev Console > Open MyLazyName (if not yet deleted) > File -> Delete

  8. Take a sfdx force:source:pull

All the best.!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .