How do you change project folder

I am using Windows 8 and PhpStorm.
I wanted to change the directory say from \old  to \new
Read through the threads but still can not find where to change this.
Really don't want to have to recreate the project again.


Comment actions Permalink

Hi there,

I wanted to change the directory say from \old  to \new

So ... you want to rename the project root folder?

If so -- select that folder in Project View panel and use "Refactor | Rename" on it.

Comment actions Permalink

Sounds great execept when I try that I get to rename C:/mydir

Comment actions Permalink

Well .. that's an access rights then. Or it could be the fact that this folder is currently opened (working folder) for some another app (Windows/DOS does not generally allow you to rename current folder).

If that's the case then try logging off completely (Windows session); login and try again without launching other apps.


The alternate manual way:

  1. Close project in IDE
  2. Go to your Explorer/file manager and rename the folder
  3. Optionally go to PROJECT/.idea/workspace.xml and replace all occurrences of old path by new one.
  4. Launch IDE
  5. Use "Open" from Welcome screen (when all projects are closed) and point to the project root folder -- IDE will open that folder as a project -- if it has .idea subfolder it will reuse those settings; otherwise it will create new project there.
  6. Alter whatever other settings you may need once project is loaded

Please sign in to leave a comment.