Renaming component category after already creating data

My client wants to rename all the components and component categories for a site that is already finished with the content-filling stage.

I saw that you can easily change the component name with no issues as it only changes the display name in the Strapi UI, leaving the database key untouched (in fact, this is even referenced and discussed as intentional in this GitHub issue).

If I change the component category name, however, I am facing an error as the database key is changed, not just the display name. Is there a way to avoid this?

I’ve googled the error and searched in GitHub issues; the error occurs fairly often but usually regarding changing the collection names, and no working solutions are available.

Does anyone have a idea?

Thanks in advance.

Have a similar issue, but I’m actually happy to lose the content so I guess rebuilding the component is going to easier.

Have tried:

  • Renaming folder under api
  • Rename of the files under that folder
  • Search and replace references of the old component name in that folder
  • Done a strapi build develop
  • Run strapi develop and the interface looks good but when I try to create a new article it says forbidden (I am a super user)
1 Like