Reference → Search and Replace

Search and Replace

Bulk content or URL replacement across imported records — the cleanup operation that often follows imports.

Search and Replace in SGEN is the bulk-cleanup operation for content or URL-level changes across many records at once. It runs most often during the post-migration window — when imported records still reference the source platform's URLs, image paths, or shortcodes — but it is also useful for any operation that needs the same change applied uniformly across a content set.

This page is the Reference definition of the operation — what it can change, how scoping works, what discipline applies before execution, and how rollback is shaped.

What is this for?

Read this page when you want the structural definition of SGEN's Search and Replace operation — what it covers, where it lives in the migration cycle, and what discipline applies before running a bulk replacement.

The page is a Reference definition. It does not walk you through running a specific replacement — that procedure lives in Guides.

Good use cases

  • You completed an import and need to replace source-platform URLs across imported records.
  • You are renaming a domain and need to update internal references across the site.
  • You are removing or updating a shortcode pattern across many records.
  • You are scoping a post-migration cleanup window and need to plan the bulk operations.

What NOT to use this for

  • Per-record edits — open the corresponding SG-Admin module directly.
  • Site-wide CSS or theme changes — those happen at the admin Appearance surface, not via content replacement.
  • Step-by-step procedures — open the relevant Guide.
  • Rollback procedures — open Recovery Considerations and Backups.

How this connects to other features


Definition

Search and Replace is the operation that finds a defined pattern across content records and replaces it with a defined replacement. The platform supports the operation at the platform level so the same change can be applied consistently across many records at once rather than per-record.

The defining property is span. Search and Replace touches many records in one operation. That span is what gives it reach and what makes it risky — and what makes the discipline around it (scoping, dry-run, backup capture) matter.

Purpose

The purpose of this page is to define Search and Replace as a Reference layer rather than as a configuration walkthrough. It explains what the operation can change, how scoping shapes the affected set, what discipline applies before execution, and how rollback is structured if the operation produces unintended results.

Scope

This page covers Search and Replace at the Reference level — the model rather than the procedure.

The page covers:

  • What Search and Replace can change (content, URLs, references).
  • Scoping options (per-module, per-record-set, site-wide).
  • The dry-run discipline that should precede execution.
  • The backup capture discipline before high-stakes replacements.
  • Rollback framing if the operation produces unintended changes.
The page does not cover:
  • Per-source-platform URL patterns or replacement strategies — per-source Guides.
  • Step-by-step replacement procedures — Guides.
  • Site-wide configuration changes — those happen elsewhere.

Where to find it

Search and Replace lives at the admin → Tools → Search and Replace. The tool surfaces a query field, a replacement field, scope selectors (by module, record type, or site-wide), and a preview step that shows the matched records before the replacement runs. Always use the preview before committing a site-wide replacement.


What it can change

Search and Replace operates on the text content of records.

Content text

Body text, titles, captions, alt text, structured field values across the records in scope. Anything stored as text in a record is in scope.

URLs and references

Internal links pointing at source-platform URLs that need to point at the SGEN site after import. Asset paths, embed sources, structured-data references that contain URL-shaped strings.

Shortcodes and patterns

Shortcode-shaped patterns or templating fragments that need to be removed, renamed, or re-shaped after import. The operation treats them as text patterns; per-shortcode behavior is governed elsewhere.

Site · staging.example.com · Tools

Search and Replace

Dry-run preview: 340 records would change · 1,287 occurrences matched
⚠ Capture a backup before executing

Discipline before execution

Search and Replace is high-span by nature. The platform expects operators to apply the following discipline before running a replacement at scale.

Capture a backup

Trigger an on-demand backup before the replacement runs. The backup is the rollback target if the operation produces unintended changes.

Dry-run first

Run the replacement in dry-run mode and review the affected record list before executing for real. Dry-run shows what would change without changing anything.

Scope tightly

Limit the operation to the smallest set of records that needs the change. Site-wide replacements affect the most records but produce the most surprising side effects; per-module or per-tag scoping reduces the blast radius.

Execute on staging first

Where the plan supports staging-vs-live separation, run the replacement on staging, validate the results via Post Migration discipline, then promote to live.


Rollback framing

If a Search and Replace pass produces unintended changes, rollback is via the captured backup snapshot — restore to the pre-replacement snapshot, rescope the replacement, run again. Recovery Considerations covers the broader rollback framing.


Constraints and boundaries

Search and Replace is a Reference area for the bulk-content cleanup operation. It is not a substitute for per-record edits, theme changes, or site-wide configuration adjustments.

Use Search and Replace for:

  • Bulk URL or content replacement across many records at once.
  • Post-migration cleanup of source-platform references.
  • Coordinated text changes that need to land uniformly across a content set.
Do not use Search and Replace for:
  • Per-record edits — use the admin module directly.
  • Site-wide CSS or theme changes — those live in the admin Appearance.
  • Settings changes — those live in the admin Configuration.

Public boundary

This page is intentionally public-safe. It does not expose replacement-engine internals, exact match algorithms, or protected operational identifiers.


Examples

Example 1 — Post-migration URL cleanup

After importing 500 blog posts from a source platform, internal links still point at the source URL. The operator captures a backup, runs Search and Replace dry-run scoped to Blog posts → Body content with the source URL pattern, reviews the 1,287-match preview, executes, validates via Post Migration behavior validation, then promotes staging to live.

Example 2 — Domain rename

The site moves from oldname.com to newname.com. The operator captures a backup, runs Search and Replace site-wide with the old-domain pattern → new-domain pattern, dry-runs, reviews, executes, validates. The operation completes the content side; DNS and configuration changes happen separately.

Example 3 — Shortcode removal after platform feature change

A shortcode no longer rendering on SGEN needs to be removed from imported content. The operator scopes the replacement to records containing the shortcode, dry-runs to preview affected records, executes, and confirms the records render correctly without the shortcode.


Documentation guidance

Use this page as the structural definition for the bulk-cleanup operation. Procedural detail belongs in Guides; per-release behavior change belongs in What's New or Changelog. Cross-reference Backups (foundational safeguard) and Post Migration (validation discipline) for the operations that surround Search and Replace in the migration cycle.

Reading order

Open this page when planning a bulk content or URL change. Pair with Backups for the pre-execution safeguard discipline. Pair with Post Migration when running Search and Replace as part of the post-import cleanup pass. Pair with Recovery Considerations when scoping the rollback path before execution.


Related reading


Vocabulary cross-reference

  • Find pattern is the text or URL pattern Search and Replace looks for.
  • Replacement is the text or URL that replaces every match of the find pattern.
  • Scope is the set of records, fields, or modules the operation runs against.
  • Dry-run is a non-mutating preview pass that shows what would change without executing.
  • Match count is the number of occurrences across the scoped record set.

Maintenance discipline

When Search and Replace behavior changes across releases (new scope option, new dry-run output, new pattern syntax), update this Reference and log the change in Changelog. The page stays valuable because the operation's discipline (backup, dry-run, scope, execute) stays small. New scoping options should land inside the existing model rather than as a new operation type.

On this page