File Scan Code Search

44
Web image: File Scan Code Search

3 min read • 421 words

File Scan Code Search

Admin-only file and code search for WordPress, with safe presets, optional advanced paths, and performance guards.

Search text, code patterns, or regex across your WordPress files from a single admin tool. Built for fast troubleshooting, audits, and incident response. Read-only by design.

File Scan Code Search

  • Find injected code quickly after a hack
  • Audit plugins/themes for specific functions or domains
  • Locate deprecated hooks or debug fatal errors
  • Search uploads for suspicious strings (read-only)

Safety and privacy

What this plugin does

File Scan Code Search adds an admin page under Tools → File Scan where you can search across common WordPress locations (core, wp-content, plugins, themes, uploads) or choose a custom path. Results are returned via AJAX and show matches with file paths and line context.

  • Read-only (never modifies files)
  • No tracking, no remote calls
  • Runs only in wp-admin, only for admins
  • Respects server restrictions like open_basedir

Key Features

  • Admin-only scanner (no frontend impact)
  • Auto-detected locations in the Directory dropdownWordPress root, wp-content, plugins, mu-plugins, themes, uploads wp-admin, wp-includes, languages, active theme, parent theme
  • Custom path scanning with safe validationSupports subfolder installs using Site Home detection
  • Optional advanced scanning outside WordPress (explicit opt-in)Extra server locations appear only if enabled in wp-config.php
  • File extension filter (example: php,js,css)
  • Case-sensitive mode
  • Regex mode (for advanced patterns)
  • Limits to reduce timeouts and accidental heavy scans
  • Read-only, no file modifications

How to Use

  • Install and activate the plugin.
  • Go to Tools → File Scan.
  • Select a Directory preset (recommended) or choose Custom path.
  • Enter the search text (or regex).
  • Pick directory
  • Adjust extensions and options, then run the search.

Tip: If you need to scan a specific plugin, pick its folder (faster and more reliable than scanning the entire plugins directory).

Advanced Mode (optional)

Scanning outside WordPress is disabled by default for safety. To enable advanced server locations, add this line to wp-config.php:

define( ‘FSC_ALLOW_OUTSIDE_WP’, true );

This is also shown inside the plugin under the Advanced tab in multiple languages.

Installation

  • Upload the plugin folder to /wp-content/plugins/
  • Activate File Scan Code Search from the Plugins page
  • Open Tools → File Scan

No comment

Leave a Reply

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