Find all Files Containing a String Including Subdirectories

As a WordPress developer you may often find yourself at the mercy of whichever theme you are using to build a site. Poorly coded themes can create a litany of problems especially with SSL. You may often have a hard time trying to find out how a theme codes something or where it has hardcoded HTTP instead of HTTPS.

The easiest way to fix things like mixed content SSL warnings is to run a grep query from the command line to quickly find all instances where the developer may have used HTTP.


grep -rl "string" /path
#if we were searching for calls to mixed content our query might look like this:
grep -rl  "http" /home/username/