# Codebase indexing is not indexing subfolders

**URL:** <https://forum.cursor.com/t/codebase-indexing-is-not-indexing-subfolders/22619>\
**Category:** Help\
**Created:** [October 13, 2024, 6:57am UTC](https://forum.cursor.com/t/codebase-indexing-is-not-indexing-subfolders/22619 "2024-10-13T06:57:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![froehlich.consulting](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/froehlich.consulting/32/8338_2.png) [@froehlich.consulting](https://forum.cursor.com/u/froehlich.consulting)\
**Post date:** [October 13, 2024, 6:57am UTC](https://forum.cursor.com/t/codebase-indexing-is-not-indexing-subfolders/22619/1 "2024-10-13T06:57:06Z")

</div>

Hi,

i try to index all php files from wordpress. My .cursorignore file looks like this:

`# ignore everything`  
`*`  
`# don't ignore php files`  
`!**/*.php`

With this setting the chat knows only files in the current folder and doesnt find any php files in subfolders.  
When i press reindex, its listing within a second all files in the current folder, but no subfolders before reaching 100%.

How do i get cursor to index more php files? Thank you

---

<div class="post-metadata">

**Author:** ![danperks](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/danperks/32/19087_2.png) [@danperks](https://forum.cursor.com/u/danperks)\
**Post date:** [October 13, 2024, 9:08am UTC](https://forum.cursor.com/t/codebase-indexing-is-not-indexing-subfolders/22619/2 "2024-10-13T09:08:35Z")

</div>

Hey, can you try something like this? Think you need to tell Cursor that it’s allowed to go into the directories in the first place, otherwise it skips straight over them!

```auto
# Ignore everything
*

# But don't ignore directories, so Git can traverse into them
!*/

# Don't ignore .php files
!*.php

```

---

<div class="post-metadata">

**Author:** ![froehlich.consulting](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/froehlich.consulting/32/8338_2.png) [@froehlich.consulting](https://forum.cursor.com/u/froehlich.consulting)\
**Post date:** [October 18, 2024, 5:06am UTC](https://forum.cursor.com/t/codebase-indexing-is-not-indexing-subfolders/22619/3 "2024-10-18T05:06:22Z")

</div>

Danke!!!
