I know that is used to search : Ctrl+Shift+F or Edit | Find | Find in Path and it worked before, but now always returns the empty set, although I know that what I'm looking for - there is in the project

Maybe someone had this problem?


Solution 1:

As lena said, the following should fix it for you:

  1. Click File -> Invalidate Caches / Restart..
  2. Click the button "Invalidate and Restart"
  3. After restart, try run the search again

Solution 2:

For me nbaosullivan's proposed solution didn't work.

In my case Recursive(Alt+Y) options wasn't selected. I selected it and it worked and it will be set as default, you don't need to select it all the time.

See that icon and select it please

Solution 3:

Try this (it helped me in PhpStorm 2019.3.1 when "Invalidate Caches / Restart" did not):

  1. Close WebStorm

  2. Backup directory <your project>/.idea/ to anywhere

  3. Delete file <your project>/.idea/modules.xml

  4. Open WebStorm

Solution 4:

Newer version of Webstorm /PHPStorm automatically exclude some folders. For example vendor folder.

https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000798990-Vendor-directory-being-automatically-excluded

make sure that folders are not excluded

Solution 5:

As an alternative where I needed to refactor the word "holder" with "owner". Using Webstorm's find did not work very well for me. I decided to use instead the the command line with egrep:

egrep -Rli [^place]holder ./src
-R (recursive all files in directory including symbolic links)
-l (file name only)
-i (ignore case)

I found everything and excluded some instances as well via regex. It is way easier and most accurate.