Make Windows 7 fulltext search PHP documents

Recently while trying to find the PHP file that I needed to edit, I was once again frustrated by Windows seeming inability to search the text contained in PHP files 🙁 Windows obviously has the capability to do file content searches since it does so for .txt files.

Finally I got fed up with it and decided to find out how to enable full text searching of .php documents. Here is what worked for me, I hope you will find it helpful too 🙂

How to index file contents for any extension (including PHP files)

  • Open the Windows Start menu and type in the search box: “Change How Windows Searches”, choose the Control Panel option that matches your search
  • Choose the “Advanced” button (it will likely have a shield icon on it)
  • Choose the “File Types” tab in the Advanced Options window.
  • Scroll down to find the extension that you want Windows to index file contents of
    • If your extension is not listed,  enter the correct extension… for example “.php” into the input box and press the Add button.
  • Once the appropriate extension is highlighted, change the indexing property to “Index Properties and File Contents” and choose OK
  • Voila, Windows should now be able to search the file contents for the extension that you added!

Screenshots of the last few steps:

Leave a Reply

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