52

I'm using PhpStorm 6.0.3, and it doesn't show any directories in the Project Tool Window. They were there just a minute ago but I managed to make them disappear by clicking or shortkey on accident.

They are there in the file system - I see them in Windows Explorer, but they just don't show up in PhpStorm. I have checked the Jetbrains documentation, checked the scope and tried deleting the project-settings (.idea-dir), but to no avail.

Does anybody have a suggestion on how to show them again? Or where I might have screwed up the settings? Thanks!

Damjan Pavlica
  • 31,277
  • 10
  • 71
  • 76
Jelmer Keij
  • 1,576
  • 1
  • 19
  • 33

14 Answers14

136

removing the .idea folder, and restarting the app did the trick for me

fallanic
  • 1,501
  • 2
  • 10
  • 7
37

Have you changed the scope dropdown value by any chance?

scope dropdown

deceze
  • 510,633
  • 85
  • 743
  • 889
  • I have checked, it is on "project". By the way, if I look under project settings > deployment > directories then I see I have not excluded my dirs. – Jelmer Keij Jul 03 '13 at 10:46
  • @JelmerKeij I changed mine to "project files" and that showed me the files on mine. Thanks deceze – Eoin May 20 '20 at 14:47
34

So, it's now a couple of months later and made the same mistake. Only this time I made 1 directory disappear and was accidentally pointed in the right direction by PhpStorm itself. I excluded the directory from the project, so it didn't show up anymore. Apparently exluded dirs are not saved in the project settings since re-creating the project didn't help.

Here is how I found it back: File > Settings > Project settings > Directories There I saw my dir flagged with a red icon, meaning excluded. Just right-click it and click 'exclude' once again. Tadaaaa it's back.

I can't believe I've overlooked it so many times...

Jelmer Keij
  • 1,576
  • 1
  • 19
  • 33
  • If anyone knows where these settings are hiding in webStorm, pls post. Thank you! – R Claven Oct 06 '14 at 17:44
  • 1
    Isn't it in the same place as in PHPStorm? http://www.jetbrains.com/webstorm/webhelp/configuring-folders-within-a-content-root.html – Jelmer Keij Oct 11 '14 at 08:49
  • 4
    This helped me a lot. Just add a little comment so mac users can also find what they are looking for instead of file > settings > project settings > directories, mac users need to look for PHPStorm > preferences> project > directories. – Hiltje Dec 12 '15 at 15:15
  • I also had this issue and found it was a permissions issue. I couldn't track down the exact spot but giving everything full permission fixed it. I ended up just starting a fresh project though – doz87 Jul 24 '17 at 13:40
  • This was more-or-less my solution as well, except under `Directories` I ad not directories listed so I clicked "Added root directory" and selected my root folder and was back in business. Thanks for the direction. – David Baucum Feb 07 '18 at 21:03
14

My USB flash drive decided to randomly disconnect itself while I was opening up the project, then I plugged it back in and no directories were showing up. Just the default files like all the .git files, .htaccess, and the index.php.

By going to File > Settings > Project: ProjectName > Directories. There was no longer any content root. I just had to click "Add Content Root" select my root folder and I was able to see everything again :)

Also it seems people have excluded directories like their content root or individual files which can be managed through the same settings.

CTS_AE
  • 12,987
  • 8
  • 62
  • 63
7

Here is how i did it in PHPStorm 2016.

Open the Settings / Preferences Dialog by pressing ⌘, or by choosing File | Settings for Windows and Linux or WebStorm | Preferences for OS X. Click the Directories node.

Then:

enter image description here

max4ever
  • 11,909
  • 13
  • 77
  • 115
4

My Folders got hidden by PHPStorm when I used the Project view:

enter image description here

All files are shown, when you switch to Project Files view:

enter image description here

Sebastian Viereck
  • 5,455
  • 53
  • 53
2

File -> Settings -> Directories -> + Add content root

Happy Coding!

Tahseen Alaa
  • 342
  • 4
  • 9
1

Go to PhpStorm setting(Ctrl+Alt+s) type and select 'file types' not 'other file types'!(Editor > File Types) in 'Ignore files and folders' remove all extension you need(i remove all!).

Apply it and you can see all your files in PhpStorm

slava
  • 791
  • 1
  • 11
  • 26
Omid Ahmadyani
  • 1,430
  • 13
  • 15
0

I just solved a similar problem with Webstorm (Windows version 10.0.1) in a Cordova project. I created a new directory within the www folder, did not add any files and closed Webstorm. When I restarted Webstorm the next day, the new folder was invisible but existed as Webstorm refused to create a new one with an " ... already exists" error message and the file was listed as visible in the directories settings.

I solved the problem this way: Closed Webstorm -> Added a file to the empty folder with the Windows file browser -> Opened Web Storm -> The folder and the file was shown.

Nantoka
  • 4,174
  • 1
  • 33
  • 36
0

I just experienced this problem in phpStorm 9 where I was trying to create a project from existing files but phpstorm could not see the directory. Very weird.

So what I did was I instead went to "create new project" and manually put in the location box the path to an existing directory. On the next screen it asked something like "directory exists, do you want to create project from these files?" and that worked.

prograhammer
  • 20,132
  • 13
  • 91
  • 118
0

PHPStorm seems to do this in case of empty directories (at least if you actively delete a file inside of phpstorm).

As a temporary quick fix you can simply open the folder in explorer and create any empty file:

Create any empty file

After you've done this, make sure you syncronize your project by right-clicking and selecting "Syncronize":

PHPStorm "synchronize"

That should make your previously hidden folder visible and you can simply create your first actual file and just delete the empty file afterwards.

h2ooooooo
  • 39,111
  • 8
  • 68
  • 102
0

You can delete .idea/workspace.xml file.

Alper AKPINAR
  • 71
  • 3
  • 10
0

File -> Reload all from disk

I used rsync to sync files and they didn't appear in PhpStorm, this helped

-1

The below methods showed they were successful but still failed to show some directories which were empty or had a few files

  • Synchronize the directory
  • No directories were excluded in the Directory tab.

What worked for me was closing the project having the issue and reopening it another project window and choosing open in the current window

pg2286
  • 1,011
  • 12
  • 21