Bulk search and replace site content

How to find and replace text across your entire site in SGEN

The Search & Replace tool lets you swap a word, phrase, or URL across every page, blog post, settings value, and redirect on your site in a single operation. It is a power tool: one run can touch thousands of rows at once. A dry-run option shows you what would change before committing anything.

What is this for?

Search & Replace is the right tool when the same string appears in many places and you need every instance changed at once. The classic case is a domain migration — you move from www.old-brand.com to www.new-brand.com and need every internal link, canonical tag, and stored URL updated in one pass. It is also useful for a company rename or a URL-structure change that affects dozens of pages. Because the change is irreversible without a backup restore, this tool is strictly for administrators who understand what they are replacing and have verified counts on a dry run first.

Good use cases

Example 1: Domain migration — rewriting every stored URL after moving to a new domain. Your site was at www.yoursite.com and has moved to www.yoursite.com. Internal links, image src attributes, canonical URLs stored in page metadata, and site-settings values all still reference the old domain. Running a Search & Replace with www.yoursite.comwww.yoursite.com across all available tables rewrites every occurrence in one pass.

First, run the dry run to see counts before touching anything:

Preview: Search & Replace — a screenshot of this screen will be added here.

After the dry run, the tool reports back counts per table — for example: "Searched table posts — 47 cells found, 0 changes made (dry run)." Review every table's count. If a count looks unexpectedly high, narrow your search term or deselect that table before running live.

Example 2: Company rebrand — replacing an old company name across all published content. Your company rebranded from "Your Store Widgets Co." to "Your Store" and dozens of blog posts, page descriptions, and site settings still use the old name. A single Search & Replace with Your Store Widgets Co.Your Store across posts and post_metas rewrites every occurrence. Dry-run first to confirm the count matches your estimate.

Preview: Bulk action result — a screenshot of this screen will be added here.

When the counts look right, uncheck Run as dry run and submit again. The tool reports the same table breakdown with actual change counts.

Example 3: Cleaning up a stale redirect source after restructuring URLs. Your site previously had blog posts at /news/ and now uses /blog/. The redirects table has 30 rows pointing from /news/.. source paths to /blog/... You also have internal links in older page content still referencing /news/. Running Search & Replace with /news//blog/ across posts, post_metas, and redirects in one pass cleans up both surfaces.

Preview: After Search & Replace — posts table — a screenshot of this screen will be added here.

What NOT to use this for

How this connects to other features

Before you start

Where to go

  1. Sign in to your SGEN admin panel.
  2. In the left sidebar, click Tools.
  3. Click Search & Replace.

Steps

1. Enter the search and replace strings

In the Search for field, type the exact string you want to find. In the Replace with field, type the new string. Leave Replace with blank if you want to delete every occurrence of the search string.

2. Select the tables to search

The form lists every database table available to search. Check the tables most likely to contain your string. For domain changes, check at minimum: posts, post_metas, site_settings, redirects, and custom_codes. Unchecked tables are skipped entirely.

3. Leave "Run as dry run" checked for your first pass

The Run as dry run checkbox is on by default. Submit with it on. The tool counts matches per table and shows results — no changes are written. Review the counts carefully. If any table shows an unexpectedly large count, investigate before proceeding.

4. Review the dry-run results

After the dry run, the page reloads showing a result line for each table: how many cells matched and how many changes would be made. Verify the totals align with your expectations. If a count looks wrong, refine your search string.

5. Uncheck "Run as dry run" and submit the live run

When the dry-run counts are correct, uncheck Run as dry run and click Run Search/Replace → again. The form re-populates with your previous values so you do not need to re-enter anything. This is the live write — it changes the database immediately.

6. Verify the result on your site

After the live run, open two or three pages that should have been affected and confirm the new string appears where expected. If you use a caching layer, hard-reload the page with Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac).

What success looks like

The page reloads after the live run showing a result line for each selected table confirming how many cells were changed. For example: "Searched table posts — 47 cells found, 47 changes made." Each table you selected shows its own count. Open a few affected pages in your browser — the new string should appear where the old one was.

What to do if it does not work

Next step

After a domain migration Search & Replace, review your Redirects list to ensure old-domain redirects are in place for any external links you cannot update. Then verify your Site Settings → General to confirm the canonical URL reflects the new domain.

Steps

Steps to run a search-and-replace

  1. Open Tools → Search & Replace at your admin area.
  2. Enter the Search for string. Match is case-sensitive by default.
  3. Enter the Replace with string.
  4. Pick the Scope — pages, posts, settings, redirects, or all.
  5. Click Preview. SGEN scans without writing and lists every match.
  6. Review the preview list. Verify the matches are what you expected.
  7. If correct, click Apply. SGEN performs the swap across all matching content.
  8. The Result screen confirms the count of changes per content type.
Preview: Search & Replace — Preview — a screenshot of this screen will be added here.

Steps to undo a search-and-replace

There is no automatic undo. Recovery options:

  1. Run a reverse search-and-replace if the original strings are still unique. Search the new value, replace with the old. Works only if the new value did not exist before the swap.
  2. Restore from a backup taken before the swap. Tools → Backup & Restore stores recent snapshots if backup is configured.

Tips

Troubleshooting

Preview: Bulk action result — a screenshot of this screen will be added here.

FAQs

Q: Does Search & Replace touch media file URLs? Yes if the URLs appear in page or post content. The media library itself is not modified.

Q: Can I limit the search to a date range? Not directly — Scope is by content type. Date filtering needs the source pages or posts to be filtered first.

Q: Is there a regex mode? Plain string match by default. Check the Scope dropdown for advanced options on your version.

Cross-area considerations

Preview: Search & Replace — recent runs — a screenshot of this screen will be added here.

Operational scenarios

Backup workflow

The recommended workflow for any large or risky search-and-replace:

  1. Take a backup snapshot under Tools → Backup & Restore.
  2. Run Search-and-Replace with Preview.
  3. Review the preview list line by line for the first 10-20 matches.
  4. Apply.
  5. Verify on the public site.
  6. If the result is wrong, restore from the backup.

Scope

This reference covers the Bulk Search and Replace tool — the admin-side operation that finds a text string across selected SGEN database tables and replaces every occurrence. It applies to all SGEN plans. It does not cover:

Examples

Example 1: Rebranding across all content. Your Store rebrands their "Classic T-Shirt" line to "Signature T-Shirt". The site admin runs Search and Replace with Classic T-ShirtSignature T-Shirt across posts and pages. Dry run shows 47 matches. After reviewing the first 10 and confirming they all look correct, uncheck dry run and apply. The live site reflects the change across all 47 instances.

Example 2: Correcting a misspelled product name. Your Store's editor notices that "Canvas Tote Bag" was entered as "Canvas Tote Bga" in 12 blog posts and product descriptions. Run Search and Replace with Canvas Tote BgaCanvas Tote Bag. Dry run confirms exactly 12 matches. Apply and verify two posts live.

Example 3: Updating an old domain in internal links. Your Store migrates from an old domain. Run Search and Replace with oldyoursite.comyoursite.com across all tables. Dry run finds 23 occurrences in page content and post bodies. Apply, then check five representative pages to confirm the links resolve correctly.

Preview: Search and Replace — a screenshot of this screen will be added here.

Fields

FieldPurposeNotes
Search forThe exact string to findCase-sensitive; no regex
Replace withThe string to substituteLeave blank to delete every occurrence of the search string
Tables to searchWhich database tables are scannedSelect narrowly for faster runs; "all" is slower and riskier
Run as dry runShows matches without savingAlways run dry first to verify match count
Dry-run resultsPreview list of affected rowsShows table name, row ID, and matching excerpt
Apply buttonCommits the replacementIrreversible without a backup

When NOT to use Search-and-Replace