If Windows 11 File Explorer won’t return results when searching the contents of .php
files — or other custom extensions like .log
, .sh
, or .csv
— it’s because Windows doesn’t index those file types by default.
This guide shows you how to enable content indexing for custom extensions and even how to fully remove a file type from the Windows Search index using the Registry Editor.
Whether you’re a developer working with code, or anyone needing to search inside non-standard file types, this fix applies to you.
❔Why File Content Search In File Explorer Doesn’t Work for Certain Extensions
By default, Windows only indexes the contents of file types it recognizes as documents, like .txt
, .docx
, or .html
. Other extensions — such as .php
, .log
, or .md
— are either not indexed at all or only have their properties indexed.
That means File Explorer will return no matches when you try to search inside these files.
✅ Fix: Add Any File Extension (e.g. .php
) to Indexing Options
📁 Step 1: Open Indexing Options
- Press
Win + S
(or just press the Win key) and type Indexing Options. - Click Advanced, then go to the File Types tab. (in a non-administrator user account, you will need to enter an administrator password)

Once you enter the advanced search indexing, if you scroll down to your file type, you will most likely see that it does not exist.

If the file extension (e.g. php) doesn’t exist, we are simply going to add it!
🔎 Step 2: Add or Enable the File Extension
- Scroll down to the file extension. If it was php and you have not added it before, it will not be listed.
- If it is not listed, add it by typing php in the input field and click Add (do not include the . in .php, just php)
- When you have clicked Add, you will notice that when you click on the new extension (e.g. php) by default it will appear as File Properties Filter and the options below will be pre-selected to ‘Index Properties Only’. This basically means it will search by file extension but it will not allow you to search the text contents inside the file.
- To enable searching contents inside the file, change it to ‘Index File Properties and File Contents’.
- See the images below.
- Pro Tip: If you want to add any more file types, do it now. After we finish and exit, Windows 11 will begin rebuilding the search index which takes a lot of time. So add all your new file types now. You can edit it again later but then indexing will be triggered again.
- Click OK, then rebuild the index when prompted.
💡 This allows Windows to include file contents in search results for that extension — great for developers or power users.


🧹 Optional: Rebuild the Search Index
This is optional but recommended. To properly search inside file contents and to do so faster, we need to rebuild the search index.
After making changes:
- Return to Advanced Options (as per steps above to access the File Types)
- Under the Index Settings tab, click Rebuild
- When it closes, you should be returned back to the main Indexing Options and you should see an image of an animated Magnifying class circling over a hard drive. This process will take some time but you can safely click Close and the rebuild will continue in the background.

❌ Want to Disable or Delete & Fully Remove a File Type from Indexing?
To disable a search file type from search indexing :
- Open Indexing Options again and click Advanced (enter admin password if asked) & select File Types tab.
- Scroll to the file extension
- Uncheck the check box and click OK.
- Optional, rebuild the search index above to make the changes apply.
Disabling a file type in the search index will not remove or delete it from the System. If you want to completely delete the file type, you’ll need to make a simple windows registry edit.
⚠️ Warning: Be careful when editing the registry. If you are unsure, do not proceed as changes to the registry can damage your system. If you are not an expert here, make a backup of the registry first!
There are a couple of different registry keys we can target.
🧠 Technical Note: On recent versions of Windows 11 (like 24H2), the traditional FileTypes
key under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\Capabilities
may not exist. Windows appears to now manage file indexing more dynamically.
To delete the File Type from Windows 11 24H2:
- Refer to the image below
- Press
Win + R
, typeregedit
, and hit Enter. Or Press Win Key and type registry editor and hit Enter - In the box under the menu, paste Computer\HKEY_CLASSES_ROOT.php (this is for the php file extension we added. If you want to delete a different file extension just edit it like follows Computer\HKEY_CLASSES_ROOT.log (for a log file extension)
- In the left navigation bar, Right-click the
.php
key (or any other extension) and choose Delete. - Close the registry editor.
- 🔎 If the extension you are looking for does not appear in the registry editor, it is likely that in the Index Options File Types, the extension was disabled. You can repeat the steps above to go back in and enable it. Once it is enabled, return to your registry editor and press F5 or from the menu select View > Refresh. The extension should now be visible for you to select it and delete it.

🧠 Bonus: Apply to Any File Extension
These steps apply to more than just .php
. You can follow the same process for:
.log
.ini
.sh
.py
.js
.tpl
- Any custom or developer-specific file types
This is ideal for devs, sysadmins, and data analysts who regularly need to search inside files with niche extensions.
✅ Open File Explorer, navigate to a folder holding your new file types (e.g) PHP and test it!!
As search index is possibly still being rebuilt, your results may be a little slow or inconsistent at first. But once the rebuilding of the index is complete, it will work just like below!

🔖 We have an amazing new tool to search inside files much faster than File Explorer coming soon and it will be FREE!
Bookmark This page now – as we will post the link here as soon as it is released
![]() | This solution was developed and confirmed in Windows 11 24H2, 23H2 & 22H2*. by windowssolved.com |
![]() | This is an original article copyright to windowssolved.com This article may be shared via link to this page. You may not repost the content of this page, even with attribution without prior written permission. |
![]() | If you found this article helpful, please leave us a comment and a rating below. You are also welcome to shout us a coffee by clicking on the cup! |
0 Comments