# How to change the name of a C++ class?

**URL:** <https://forums.unrealengine.com/t/how-to-change-the-name-of-a-c-class/274152>\
**Category:** C++\
**Tags:** General, unreal-engine, UE5-0, UE4-27, question\
**Created:** [January 22, 2022, 11:54am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-a-c-class/274152 "2022-01-22T11:54:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Divyanshu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/divyanshu/32/495647_2.png) [@Divyanshu](https://forums.unrealengine.com/u/Divyanshu)\
**Post date:** [January 22, 2022, 11:54am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-a-c-class/274152/1 "2022-01-22T11:54:01Z")

</div>

Hey Everyone,  
I made a new C++ project in unreal 4.27 and noticed that I can no longer make C++ classes on the Content folder and I need to make it on the C++ classes folder but When I made one class and wanted to delete it it was not possible I also tried to rename it but it alse did not worked so how do I rename a C++ class from The C++ classes folder?

---

<div class="post-metadata">

**Author:** ![DevouringAxe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/devouringaxe/32/721278_2.png) [@DevouringAxe](https://forums.unrealengine.com/u/DevouringAxe)\
**Post date:** [January 22, 2022, 10:12pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-a-c-class/274152/2 "2022-01-22T22:12:31Z")

</div>

You cant rename C++ classes in the Unreal Editor, you got to do it through VS or the explorer.

---

<div class="post-metadata">

**Author:** ![KelbyVP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kelbyvp/32/261024_2.png) [@KelbyVP](https://forums.unrealengine.com/u/KelbyVP)\
**Post date:** [January 22, 2022, 11:15pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-a-c-class/274152/3 "2022-01-22T23:15:25Z")

</div>

1. In file explorer, edit file name.
2. In file explorer, right-click on your UProject file and click “Generate Visual Studio Project Files”
3. Open VS and re-name your generated.h file, includes, etc, to match the new file name.

---

<div class="post-metadata">

**Author:** ![Divyanshu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/divyanshu/32/495647_2.png) [@Divyanshu](https://forums.unrealengine.com/u/Divyanshu)\
**Post date:** [January 23, 2022, 5:04am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-a-c-class/274152/4 "2022-01-23T05:04:52Z")

</div>

thanks for the information 🙂

---

<div class="post-metadata">

**Author:** ![Lupoluke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lupoluke](https://forums.unrealengine.com/u/Lupoluke)\
**Post date:** [February 16, 2023, 6:17am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-a-c-class/274152/5 "2023-02-16T06:17:01Z")

</div>

Did it and it doesn’t worked  
It messed a test project luckly

---

<div class="post-metadata">

**Author:** ![Muuush](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/muuush/32/565229_2.png) [@Muuush](https://forums.unrealengine.com/u/Muuush)\
**Post date:** [February 25, 2023, 9:14am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-a-c-class/274152/6 "2023-02-25T09:14:58Z")

</div>

Worked like a charm, thank you!

---

<div class="post-metadata">

**Author:** ![BoardCogs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BoardCogs](https://forums.unrealengine.com/u/BoardCogs)\
**Post date:** [January 24, 2026, 3:38pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-a-c-class/274152/7 "2026-01-24T15:38:59Z")

</div>

Hi there, since in 2026 this is still the first page that pops out when looking how to rename c++ classes, I want to add a more specific solution that works in 5.6, if you’re using Rider as your IDE.

Just edit the .h file for the class and rename it. Rider will automatically refactor all of the code, including the class name and .cpp file name, it will also ask you if you want to add a specific line to the DefaultEngine.ini file to notify the Unreal Editor that any derived classes (especially blueprints) need to update their parent refs, you should absolutely let it do this unless you want all your blueprints to get scrambled.

In a specific case this method didn’t work, but I just renamed the .cpp file instead and THAT worked (but it left an old copy of the previous .h file I had to manually delete), figures.
