If it's not a C++ project, you can just rename the .uproject file.
If it is a C++ project, this got easier in UE5:
-
Rename the .uproject file
-
Rename the Target.cs files and the classes they contain
-
Delete the Binaries and Intermediate folders for the project
-
Generate the solution
Thanks, discord user Evilsmevil.
If it's not a C++ project, this is only a partial solution, as it will not package due to a Target module mismatch.
-
Rename .uproject to NewName.uproject
-
In your project's "Config" folder, open "DefaultEngine.ini" and add or change "GameName" entry under URL section to your new project name:
[URL]
GameName=NewName
-
Delete all of your Binaries/Intermediate/Saved folders.