Search for Text Inside of PHP Files with Vista

Problem

Windows ignores text inside of PHP files because it doesn’t recognize them. This makes it very difficult to search for specific words or phrases inside of PHP files.

Solution

If you have Windows Search Indexing disabled, view this solution. Otherwise continue with the steps below.

  1. Perform a search on the Start Menu for “indexing”. In the results, click on “Indexing Options”.
  2. With “Indexing Options” open, click on the “Advanced” button.
  3. Click on the “File Types” tab and scroll down the list until you see php in the Extension column.
  4. Click on php to select it, then select the radio button below that reads “Index Properties and File Contents”.
  5. Click OK. Click Close.
  6. Restart your computer.
Search within PHP files
Search within PHP files

Now when you perform a search for a word, you will be able to click “Search in File Contents” and it will search all the text inside of the PHP files and return results for your query. That’s all there is to it.

9 thoughts on “Search for Text Inside of PHP Files with Vista”

  1. “Perform a search on the Start Menu for “indexing”. In the results, click on “Indexing Options”

    ————————

    I don’t see an “indexing” option under Start Menu search. Can you dummy down step 1 please?

    1. You can also open up your Control Panel ( Which can also be found in the Start Menu ).

      Then try searching for the “Index Options” there.

      The Search Box is in the top right corner of the Explorer if you want to save time finding it.

      Thanks for the tip. It’s been really helpful. No more string hunting for me. ๐Ÿ˜€

  2. muze, Follow the red arrows in the graphic I have provided. It will help you follow the steps. Also, I have Vista Home Premium but not sure if that makes a difference.

  3. You saved me 8 hours of unproductive trial and error and google searching. This solved ALL my problems, now I can search for all the C99 trojan strings and delete them one time. Thanks buddy.

  4. Great stuff, I wish I’d known about this before now. That’s going to save me a lot of time. Thanks for the post ๐Ÿ™‚

  5. Thanks so much for this tip Josh, it has literally saved me weeks of searching manually through 100s of PHP files in my online store for certain texts that needed changing.

    This also works in windows 7, that’s the OS I’m using.

    BTW I don’t suppose there’s a way to get Windows XP to search inside PHP files when you do a search?

    Thanks

    Jayen

Comments are closed.