Muhannad A.Alhariri
Muhannad A.Alhariri

Reputation: 3922

PhpStorm not showing project files in project view

After I had installed PhpStorm and created a project from an existing source files, The project pane is not showing any file from the directory. So how can we solve the problem?

Upvotes: 54

Views: 33878

Answers (10)

phpwebdev
phpwebdev

Reputation: 103

Invalidating the cache did not work for me. However in the file menu , there is an option named "Repair IDE". I clicked on this and went through the steps until it self repaired and started working correctly.

I am using version 2024.3.3

Upvotes: 0

Technolo Jesus
Technolo Jesus

Reputation: 322

I had selected this option by mistake

enter image description here

Upvotes: 2

sotmlac
sotmlac

Reputation: 314

For my version of Phpstorm the solution was to go to:

  1. File > Close Project
  2. Click on the gear icon of the project in question > Remove from Recent Projects
  3. Click New Project > Select the folder path > Click on Create button > Click the button Create from Existing Sources.

Upvotes: 3

No Sssweat
No Sssweat

Reputation: 438

The accepted answer did not work me. What worked for me was

File > Repair IDE...

And you'll be prompted in the lower right side corner with some alerts that have suggestions. Click on those until its fixed.

enter image description here

Upvotes: 17

mpemburn
mpemburn

Reputation: 2884

I tried the above solution and was not successful. The following, however did work.

  1. Close all projects.
  2. On the list of project, select yours, right click, and chose "Remove from Recent Projects".
  3. Click "New Project" and choose your project's directory and click "Create"
  4. In the "Directory Is Not Empty" dialog, click "Create from Existing Source".

When I opened the "new" project, everything was there including the Local History—thank the Gods!

Ref: PhpStorm version 2021.1.1 on Mac Catalina.

Upvotes: 1

Macdonald
Macdonald

Reputation: 984

I was able to resolve this in PhpStorm 2021.2.4 with the following steps:

  • Exit PhpStorm
  • Remove the existing .idea folder (like so rm -rf .idea)
  • Restart PhpStorm
  • click File > Open to select your project directory

Everything should be fine now.

Upvotes: 56

Leonel Kahameni
Leonel Kahameni

Reputation: 943

I fixed this by resetting my IDE default settings

File -> Manage IDE settings -> Restore default settings

Note that this will remove all your plugins and configurations

Upvotes: -3

Mustafa Yousef
Mustafa Yousef

Reputation: 1502

In case both above solutions do not work, try this following approach:

  1. cd to your projects .idea Folder

  2. Check if there is a file called project_name.iml. If this is not the case create it and paste the following content to it

    <?xml version="1.0" encoding="UTF-8"?>
    <module type="WEB_MODULE" version="4">
      <component name="NewModuleRootManager">
        <content url="file://$MODULE_DIR$"></content>
      </component>
    </module>
    
  3. Then check if there is a file called modules.xml. If this is not the case create it and paste the following content to it (which targets to your previously created project_name.iml)

    <?xml version="1.0" encoding="UTF-8"?>
    <project version="4">
      <component name="ProjectModuleManager">
        <modules>
          <module fileurl="file://$PROJECT_DIR$/.idea/project_name.iml" filepath="$PROJECT_DIR$/.idea/project_name.iml" />
        </modules>
      </component>
    </project>
    
  4. Restart PhpStorm

Upvotes: 106

Go to the menu File -> Settings -> Directories and then delete the current directory and add a new directory with the root of your project that worked for me.

Ingresas al menú File -> Settings -> Directories y luego eliminas el directorio actual y agregar un nuevo directorio con la raíz de tu proyecto eso funciono para mi.

enter image description here

Upvotes: 7

Muhannad A.Alhariri
Muhannad A.Alhariri

Reputation: 3922

After investigation on the issue, I got the solution as follow:

  1. Remove .idea directory from your root project directory
  2. Invalidate and restart your IDE , FILE -> Invalidate cache /Restart -> then click on Invalidate cache and restart
  3. You are done :)

Here is the source

https://intellij-support.jetbrains.com/hc/en-us/community/posts/207066915-Project-view-not-showing-directories

Upvotes: 78

Related Questions