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.

JoshStauffer.com runs on the Genesis Framework

Genesis Framework

Genesis empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go. It's that simple - start using Genesis now!

Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your site look the way you want it to. With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.

Become a StudioPress affiliate

Comments

  1. muze says:

    “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?

    • Isiah Camacho says:

      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. :D

  2. Josh Stauffer says:

    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. Andi says:

    Sounds good and would help – but I don’t get this “Search in File Contents” *grrr*

  4. skinnypirate says:

    Perfect instructions for Windows 7 as well. Thx.

  5. Chris says:

    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.

  6. Robbie D says:

    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 :-)

  7. Jayen says:

    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

Trackbacks

  1. [...] while back, I solved this problem and was able to search for text inside of PHP files but that was when I had Windows Search Indexing [...]

Speak Your Mind

*