Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you move projects around in IntelliJ/Webstorm?

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.

like image 698
Oliver Watkins Avatar asked May 13 '13 15:05

Oliver Watkins


People also ask

How do I move a project in IntelliJ?

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.

How do I arrange in IntelliJ?

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.

How do I navigate to project structure in IntelliJ?

or select File | Project Structure ( Ctrl+Alt+Shift+S ) from the main menu.

How do I switch between files in IntelliJ?

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.


2 Answers

The links in a WebStorm project are relative (using $PROJECT_DIR$), not absolute.

To move a WebStorm project:

  1. Close all open projects in WebStorm.

  2. Close WebStorm.

  3. 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

  4. Start WebStorm. The "Welcome to WebStorm" screen should be displayed.

  5. 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.

  6. 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".

like image 107
skomisa Avatar answered Oct 06 '22 23:10

skomisa


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.

like image 24
Christian Stewart Avatar answered Oct 06 '22 23:10

Christian Stewart