Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Configuration Language Lock 1.0.2 Minor update available for module config_language_lock (1.0.2). Release: Canvas Override 1.0.1 Minor update available for module canvas_override (1.0.1). Release: Media Remote Image 8.x-1.2 Minor update available for module media_entity_remote_image (8.x-1.2). Release: IDNA Convert Service (punycode) 2.0.4 Minor update available for module idna (2.0.4). Release: Bootstrap Cloud 7.1.3 Minor update available for theme bootstrap_cloud (7.1.3). Release: Token Browser 1.0.2 Minor update available for module token_browser (1.0.2). Release: Varbase Project 11.0.8 Minor update available for module varbase_project (11.0.8). Release: Media Remote Image 2.0.0-beta1 First beta version released for module media_entity_remote_image (2.0.0-beta1). Usage Milestone: Term CSV Export Import Module term_csv_export_import crossed 1,000 active installs. Security Coverage: Module Scout Module module_scout now has official Drupal security advisory coverage.

Search and Replace Scanner

10,524 sites Security covered Drupal 10–11
View on drupal.org

This module allows you to search and replace text, including using regular expressions, within node content fields. It's useful for tasks like fixing typos, updating company information, or changing links across your site, with options for fine-tuning your searches and safely reverting changes.

Search and Replace Scanner can do plain text search-and-replace, or regular expression search-and-replace, against the title, body and text content fields on all nodes in your system. This is useful for finding html strings that Drupal's normal search will ignore. The module is very handy if you are fixing typos in a lot of content, changing the name of your company, or are changing the URL of a link included multiple times in multiple nodes, among other things.

Features

  • Can search and replace text in CCK text fields, in addition to standard node title and body fields
  • Plain text search and replace orregular expression search and replace
  • Case sensitive search option
  • Plain text search allows 'whole word' matching option. For example,
    searching for "run" with the whole word option selected will filter out
    "running" and "runs", but will match "run!"
  • Can specify text that should precede or follow the search text in order for a match to be valid
  • Can limit search and replace to published nodes only
  • Searches can be limited to specific fields in specific node types, and (D7 only) can further be limited to nodes containing only specific taxonomy terms
  • Will save a new node revision when a replacement is made, in case you want to revert a change, and provides an Undo option that lets you revert all nodes that were update in a single replace operation
  • Can dynamically update teasers after replacements in other fields, or can
    by updated manually, or not at all
  • Will dynamically expand PHP's maximum execution time for scripts up to
    10 minutes on servers that support it. This allows complex queries on large
    bodies of content
  • Search results for searches and replacements can be themed

Limitations

  • Only works with MySQL database. (Postgres patches welcomed!)
  • Large search and replace actions may not finish on sites that are hosted in environments where PHP's max_execution_time variable can't be dynamically expanded. The module automatically attempts to expand the maximum execution time of a script to 10 minutes. (It's often set at 2 minutes.) If your Web host doesn't let you adjust this variable dynamically, you may be able to ask your hosting provider to make the change for your account.

Warning

This is a very powerful tool that operates directly on your database tables, and as such is very dangerous. Though there is an undo feature, we highly encourage you to backup your database before using it.

Similar Modules

Credits

  • Version 5.x-2.0: Amit Asaravala (aasarava) and Jason Salter (jpsalter). Sponsored by FivePaths, LLC.
  • version 5.x-1.0: Tao Starbow (starbow).
  • Past sponsors

    • Mediacurrent

    Depends on

    Dependencies of the latest stable release

    No dependencies recorded for this project.

    Required by

    Tracked projects that depend on this one

    No tracked projects depend on this one yet.

    Activity

    Tracked releases
    8
    Tracked since
    Dec 2024
    Latest release
    1 month ago
    Releases (12 mo)
    5 ▲ from 3
    Maintenance
    Active

    Release Timeline

    Releases

    Version Type Core Release date
    2.0.0 Stable 10–11 Aug 5, 2026
    2.0.0-beta5 Pre-release 10–11 Aug 4, 2026
    2.0.0-beta4 Pre-release 10–11 Jul 16, 2026
    2.0.0-beta3 Pre-release 10–11 May 9, 2026
    2.0.0-beta2 Pre-release 10–11 Apr 24, 2026
    2.0.0-beta1 Pre-release 10–11 Dec 22, 2024
    8.x-1.0 Stable 9–10 Dec 22, 2024
    2.0.x-dev Dev 10–11 Dec 21, 2024