Project has two folders for some reason; only one is used

Strange problem. I have a single project, but it seems to reference two different folders on my Mac, one is used (and works) but the other references an empty folder. If I delete the folder, PHPStorm will create it again. How do I get rid of this ghost folder? Also, how do I rename the project?

Mousing over the project name at the top shows the active folder, the text in the dropdown from the project references the unused folder.

Upload id: 2025_10_01_EVkr4g9ZVvYuJ6hstqgkhX (file: dddddadada434534.jpg)
 

0

I was able to rename the project but it still references the ghost folder.

0

I can delete the folder in the project list. But when PHPStorm reopens, the folder and reference return.

0

Also, I can change the name of the project. But on reopening PHPStorm, the name reverts again.

0

Hello Andrew Wulf,

I’m afraid the description of the issue isn’t quite clear yet. To help us get to the bottom of this faster, could you please share a quick screencast of the problem? You can upload it to https://uploads.jetbrains.com/ and let us know the upload ID once it’s done.

Regarding the project name not changing, open the project's .idea diretory and search for the file named .name there. Removing the file should do the trick.

0

Upload id: 2025_10_02_SABz2D97wghR62xjSJUjCN (file: Screen Recording 2025-10-02 at 10.49.50 AM.mov)

Shows the project with two folders in it. I deleted the empty one. However, it is recreated and returns. There are a few extra random attempts to stop the video, so ignore those :-)

0

Thank you!

Please try the following:
1. Close PhpStorm.
2. Open the ~/PhpStormProjects/main_project_name/.idea on the filesystem. There should be the modules.xml file there.
3. Open this modules.xml file in any text editor and check the content of the <modules> block. You should have two lines like <module fileurl="file://$PROJECT_DIR$/../somedir/.idea/somename.iml" filepath="$PROJECT_DIR$/../somedir/.idea/somename.iml" /> there. Remove the line representing the Test2 project, leaving the one with the main_project_name untouched. Save changes and close the file.
4. Start PhpStorm and check whether the Test2 project is still there and can be removed.

0

OK, that is not what I found, this is all. 

      <module fileurl="file://$PROJECT_DIR$/.idea/Test2.iml" filepath="$PROJECT_DIR$/.idea/Test2.iml" />
 

This is referring to the other folder (the one that keep reappearing), but there is no Test2.iml file in there. There is an Artsite.imi in the first folder's .idea directory .

This is clearly all messed up. I am going to start over from scratch building a project from a copy of the files without the .idea folder. Somehow all of your config files are confused.

 

0

请先登录再写评论。