String locator


When working on themes and plugins you often notice a piece of text that appears hardcoded into the files, you need to modify it, but you don’t know what theme or plugin it’s in, and certainly not which individual file to look in.

Easily search through your themes, plugins or even WordPress core and be presented with a list of files, the matched text and what line of the file matched your search.
You can then quickly make edits directly in your browser by clicking the link from the search results.

By default a consistency check is performed when making edits to files, this will look for inconsistencies with braces, brackets and parenthesis that are often accidentally left in.
This drastically reduces the risk of breaking your site when making edits, but is in no way an absolute guarantee.


  • Searching through the Twenty Fourteen theme for the string 'not found'
  • Having clicked the link for one of the results and being taken to the editor in the browser
  • Smart-Scan has detected an inconsistency in the use of braces


Will Smart-Scan guarantee my site is safe when making edits?

Although it will do it’s best at detecting incorrect usage of the commonly used symbols (parenthesis, brackets and braces), there is no guarantee every possible error is detected. The best safe guard is to keep consistent backups of your site (even when not making edits).

As of version 1.6, the plugin will check your site health after performing an edit. If the site is returning a site breaking error code, we’ll revert to the previous version of the file.

My search is failing and I am told that my search is an invalid pattern

This error is only related to regex searches, and is based off how PHP reads your regex string.

When writing your search string, make sure to wrap your search in forward slashes (/), directly followed by any modifiers like case insensitive (i) that you may want to use.


Wish I had found this plugin years ago!

No more performing code searches outside of WordPress. When dealing with complicated child themes and child plugins, finding a single piece of code has given me headaches for years.

I’m used to viewing template paths on the frontend in Magento, and it always bugged me that I couldn’t do this in WordPress. (Or is there a plugin for this? If not, would be a helluva useful plugin…hint hint nudge nudge)

This is the next best thing. And in addition being able to edit straight from the plugin is soooo great, too.

Thanks and well done!!

Time saver

Great time saver.

No need to download any files like other methods for finding bits of code.

Exactly as described

Easy to install, easy to use. It helped me find a php code I spent hours searching manually through files as the original developer renamed it. Highly recommend. A big hug to Marius, the plugin author!

Read all 44 reviews

Contributors & Developers

“String locator” is open source software. The following people have contributed to this plugin.


“String locator” has been translated into 3 locales. Thank you to the translators for their contributions.

Translate “String locator” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Upped version requirement to 4.9 as we now use the bundled CodeMirror in WordPress core.
  • Converted translation functions to the escaping versions to avoid accidental output from translations.
  • Removed bundled languages, these should be served by now.
  • Improved behavior when a search failure happens, we were accidentally looping error messages for every file (whoops).
  • Added more translatable strings.
  • Added various filters:
    ** string_locator_bad_http_codes
    ** string_locator_bad_file_types

Older entries

See changelog.txt for the version history