I have a webstorm project which i have in a certain directory. I want to move this project to another directory.
If I move the .idea folder, then nothing works at all. It seems like all the links in the project are absolute, not relative.
Move a project to another locationIn the Project tool window Alt+1 , right-click the root directory of your project and select Refactor | Move directory ( F6 ). In the dialog that opens, specify a new location for the project and click Refactor.
Rearrange codePress Ctrl+Alt+S to open the IDE settings and select Editor | Code Style. In the editor, select the code entries you want to rearrange and from the main menu, select Code | Rearrange Code.
or select File | Project Structure ( Ctrl+Alt+Shift+S ) from the main menu.
In the editor, press Ctrl+Tab . Keep pressing Ctrl for the Switcher window to stay open. Use Tab to switch between tabs and other files.
The links in a WebStorm project are relative (using $PROJECT_DIR$
), not absolute.
To move a WebStorm project:
Close all open projects in WebStorm.
Close WebStorm.
Use a file manager to move (i.e. cut and paste) the project folder to its new location. For example, use Windows Explorer to move C:/dirA/MyProject
to C:/dirB/MyProject
Start WebStorm. The "Welcome to WebStorm" screen should be displayed.
If the old project you just moved is in the "Recent Projects" list then select it, then press Delete to remove it from the list.
Select "Open Directory" from the Quick Start list, then select the project folder you just created. Your relocated project will open in WebStorm. That's it.
This approach works under Windows 7 using the latest version of WebStorm (8.0.4).
It looks tempting to select the project within WebStorm, then select Refactor > Move..., but don't go there. That is not relocating the entire project. From the documentation: "The Move refactorings allow you to move files and directories within a project".
You should simply move the entire project folder, that contains the .idea. This works fine for me in every situation I try. The links are relative to the folder containing the .idea, not the .idea folder itself. It's not like git where you can move just the .git folder, and nothing else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With