Change Project name in WebStorm
Asked Answered
P

5

12

I'm trying to change the name of my project in webstorm.

I have looked at this answer on their developer forums, but it does not work for this version (Webstorm 7). Changing the contents of .idea/.name does not change the name displayed in bold in the project folder view. I searched the .idea folder for instances of the old project name and replaced them across various configuration files like modules.xml and PROJECTNAME.iml. There are quite a few. I must have missed one because I couldn't open the project after that :)

My solution was to blow away the .idea/ folder and open the directory again, creating a new project.

Is there a better way to change a project name?

Protuberant answered 9/12, 2013 at 19:11 Comment(3)
Hit cmd+R (or ctrl+R I guess) while highlighting the top level dir in the project tree. It shows a popup whether you want to rename the dir or the project name.Grits
I couldn't get the keyboard shortcut to work, but rightclick>refactor>rename>rename project worked. Thanks @bagonyi. Wanna answer it so I can check this off?Protuberant
WebStorm has the same option as PhpStorm, documented here: Renaming Projects - Help | PhpStorm - JetBrainsRecognize
G
34

Hit cmd+R (or ctrl+R I guess) or Right click / Refactor / Rename while highlighting the top level dir in the project tree. It shows a popup whether you want to rename the dir or the project name.

Grits answered 9/12, 2013 at 22:28 Comment(2)
When I do both (rename project and directory), I get errors when I restart Webstorm: Cannot load module file '/.../.idea/oldname.iml': File '/.../.idea/oldname.iml' does not exist. Would you like to remove module 'oldname' from the project?.Plowboy
Exactly what I was looking for (May 2020)Gon
P
7

If you are struggling to rename your project in the IDE you can just rename the .iml in the .idea folder to the desired name. e.g ./idea/myProject.iml -> ./idea/myRenamedProject.iml You should close Webstorm first. I can confirm this work on OSx. I've not tried it on another operating system.

Psychoactive answered 25/9, 2016 at 14:35 Comment(2)
This doesn't work in 2019 versions of PhpStorm on MacCrispi
@famouspotatoes dont forget to change the path in modules.xmlPistoia
H
2

I just delete the .idea folder from File Explorer (Finder in OSX), rename the root folder of the project, and then open up the project in WebStorm. WebStorm will regenerate the .idea folder according to the new root folder name.

Hazaki answered 23/1, 2017 at 9:39 Comment(0)
T
1

I've got the same problem with renaming a project in PhpStorm. There was no popup window as @bagonyi mentioned. Changing from Project Files to Project has helped. I guess it will be the same in WebStorm.

Rename a project in phpstorm

Tagmemic answered 21/11, 2016 at 12:58 Comment(0)
B
0

Now, we can Rename project... via main menu.

https://www.jetbrains.com/help/webstorm/creating-and-managing-projects.html#ws_rename_projects

Betake answered 23/8, 2024 at 5:12 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.