Skip to main content
Cookbook Admin

Run a site-wide search and replace with AI

Change a name, URL, or phrase everywhere at once, with a dry run first and serialized data handled correctly.

Difficulty Intermediate
Time ~10 min
Tools run_wp_cli

Prerequisites

A connected site and a recent backup.

The prompt
Use WPVibe to search and replace across my site: change [old text] to [new text].

Run a dry run first and show me how many matches there are per table before touching anything. Call out anything risky, like matches inside plugin settings or serialized data.

Only after I approve the exact replacement, run it live and give me a summary of what changed. Then check the site still looks right and purge the cache if I have a caching plugin.

Already connected to WPVibe?

Skip the copy-paste. Just ask your AI for the “Run a site-wide search and replace with AI” recipe, or describe the task, and WPVibe runs these steps on your own site.

Renamed a product? Changed a phone number? Moved to https? The usual answer is a search-and-replace plugin, because doing it in the database by hand breaks serialized data. WPVibe handles this natively: the replacement is serialized-data-aware, and nothing runs live without your approval.

The AI always starts with a dry run, showing you how many matches exist per table and flagging risky spots like plugin settings before anything is touched. You approve the exact replacement, it runs in one pass, and you get a summary of what changed, plus a cache purge if you run a caching plugin.

Paste the prompt into your AI client with WPVibe connected and fill in the old and new text. Take a backup first: this is the one recipe where you want an undo button.

Outcome

Every occurrence is replaced in one pass, serialized data included, with a dry run reviewed before anything changed.