Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Project name in WebStorm

Tags:

webstorm

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?

like image 270
SimplGy Avatar asked Dec 09 '13 19:12

SimplGy


2 Answers

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.

like image 143
bagonyi Avatar answered Nov 14 '22 09:11

bagonyi


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.

like image 31
Marthinus Engelbrecht Avatar answered Nov 14 '22 09:11

Marthinus Engelbrecht