Solved – Windows 11 File Explorer Not Searching Inside Certain Files

Solved – Windows 11 File Explorer Not Searching Inside Certain Files

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)

    Windows 11 Search Indexing Options
    Windows 11 Search Indexing Options

    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.

    Windows 11 Search Index Missing File Extension
    Windows 11 Search Index Missing File Extension

    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.

      Windows 11 Search Index - Add a File Type
      Windows 11 Search Index – Add a File Type
      Windows 11 Search Index - Enabling Search within File Contents
      Windows 11 Search Index – Enabling Search within File Contents

      🧹 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.
      Windows 11 Search Index - Rebuild Search Index
      Windows 11 Search Index – Rebuild Search Index

      ❌ 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, type regedit, 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.

      Windows 11 Search Index - Delete File Type via Registry Editor
      Windows 11 Search Index – Delete File Type via Registry Editor

      🧠 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!

      Windows 11 Search Text Content Inside PHP & Other Files
      Windows 11 Search Text Content Inside PHP & Other Files

      🔖 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 article is originally authored by windowssolved.com

      This solution was developed and confirmed in Windows 11 24H2, 23H2 & 22H2*. by windowssolved.com
      * Deleting File Types is confirmed in 24H2 and may differ for earlier versions

      This is a copyright articleThis 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.
      You are welcome to shout us a coffee by clicking on the coffee cup!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

      Submit a Comment

      Your email address will not be published. Required fields are marked *

      If you have any questions or suggestions regarding the solutions to Microsoft Windows we have posted on our site, or would like is to publish and share one of your own solutions, feel free to get in contact with us.

      If you are a site owner and have an original article that you are the copyright owner of and would like us to re-publish it on windowssolved.com, we can do so and provide you a free valuable backlink to your website as an attribution/credit. Contact us today.

      Related Articles

      Solved – LG Gram Fails to Wake From Sleep | Windows 11

      Solved – LG Gram Fails to Wake From Sleep | Windows 11

      (Modern Standby + Windows Hello Black Screen Bug) If you're experiencing black screens or unresponsive wake-ups on your LG Gram running Windows 11 — especially after longer sleep periods — you're not alone. Every time we tried to wake the computer up from sleep mode,...