Title: CraftRoq Relocate DB
Author: CraftRoq
Published: <strong>October 7, 2026</strong>
Last modified: October 7, 2026

---

Search plugins

![](https://ps.w.org/craftroq-relocate-db/assets/banner-772x250.png?rev=3733364)

![](https://ps.w.org/craftroq-relocate-db/assets/icon.svg?rev=3733361)

# CraftRoq Relocate DB

 By [CraftRoq](https://profiles.wordpress.org/craftroq/)

[Download](https://downloads.wordpress.org/plugin/craftroq-relocate-db.1.1.0.zip)

 * [Details](https://wordpress.org/plugins/craftroq-relocate-db/#description)
 * [Reviews](https://wordpress.org/plugins/craftroq-relocate-db/#reviews)
 *  [Installation](https://wordpress.org/plugins/craftroq-relocate-db/#installation)
 * [Development](https://wordpress.org/plugins/craftroq-relocate-db/#developers)

 [Support](https://wordpress.org/support/plugin/craftroq-relocate-db/)

## Description

CraftRoq Relocate DB changes text across your database: moving a site from staging
to production, switching to HTTPS, changing a domain, or renaming something everywhere
it appears.

It is built for doing that on real sites without breaking them.

#### Preview first, always

Every replacement starts as a dry run. It searches the tables you choose, changes
nothing, and shows exactly what would change: rows and replacements per table and
column, values it would leave alone and why, and before/after examples. Only a completed
dry run can be applied, and applying it repeats exactly what was previewed.

#### Serialized data and JSON handled properly

Plugins and themes store settings as serialized PHP. A plain text replacement breaks
those values whenever the length changes. Relocate rewrites serialized data token
by token and recalculates every length, without unserializing it, so no plugin code
runs and objects, private properties, references and numbers stay exactly as they
were. URLs inside JSON (as page builders store them, with escaped slashes) are found
and replaced too.

A value is left untouched, and reported, when changing it could corrupt it: serialized
data that is already broken, a custom serialized format only its own class understands,
or JSON that would become invalid.

#### Made for large databases

Tables are processed in small batches by primary key, a few seconds per request,
so there are no timeouts or memory limits to hit however big the tables are. Progress
is saved after every batch. If the page is closed or the connection drops, the job
can be continued from the last completed batch.

#### Safety measures

 * Each batch of a replacement is one database transaction: it is saved completely
   or not at all, so an interruption never leaves a batch half applied or applies
   it twice. This needs InnoDB tables, which WordPress uses by default; the confirmation
   step warns about any that are not.
 * The original value of everything a replacement changes is saved to a downloadable
   file of SQL statements. Importing it puts those values back.
 * The site address (siteurl and home) is changed last, so you are not logged out
   part-way through.
 * Tables without a primary key or suitable unique key are skipped, because their
   rows cannot be updated one at a time safely.
 * Post GUIDs are left alone unless you ask for them to be changed.
 * Only administrators who can post unfiltered HTML can use it.

#### Also included

 * Up to 20 search and replace pairs in one job, applied together in a single pass.
 * Choose the tables to search, and leave out individual columns.
 * Case-insensitive and whole-word matching, and matching the http:// and protocol-
   relative versions of a URL.
 * A live progress view with the current table, rows scanned, changes found and 
   time remaining.
 * A searchable, sortable history of every job, a log, and automatic clean-up. Old
   jobs can also be deleted by hand.
 * Import / Export: download the database as a .sql.gz file and import .sql or .
   sql.gz files, in resumable steps, with the site address changed on the way out
   or on the way in. Imported tables are built next to the ones in use and put in
   place together at the end, so the site keeps working during an import, and one
   that fails or is cancelled leaves them as they were.
 * Export and import the plugin’s settings as a JSON file.
 * WP-CLI commands: `wp crq search-replace` and `wp crq resume`.

## Screenshots

[⌊Dashboard: start a search and replace, or pick up a recent job.⌉⌊Dashboard: start
a search and replace, or pick up a recent job.⌉[

Dashboard: start a search and replace, or pick up a recent job.

[⌊Choose what to replace, up to 20 pairs at once, and which tables to look in.⌉⌊
Choose what to replace, up to 20 pairs at once, and which tables to look in.⌉[

Choose what to replace, up to 20 pairs at once, and which tables to look in.

[⌊Live progress: the current table, rows scanned, changes found and time remaining.⌉⌊
Live progress: the current table, rows scanned, changes found and time remaining
.⌉[

Live progress: the current table, rows scanned, changes found and time remaining.

[⌊The dry run: what would change, with before and after examples. Nothing is written
yet.⌉⌊The dry run: what would change, with before and after examples. Nothing is
written yet.⌉[

The dry run: what would change, with before and after examples. Nothing is written
yet.

[⌊Confirm before anything is written, and keep a file of the original values.⌉⌊Confirm
before anything is written, and keep a file of the original values.⌉[

Confirm before anything is written, and keep a file of the original values.

[⌊Import / Export: download the database with the site address changed on the way
out.⌉⌊Import / Export: download the database with the site address changed on the
way out.⌉[

Import / Export: download the database with the site address changed on the way 
out.

[⌊History: every dry run and replacement, searchable and sortable.⌉⌊History: every
dry run and replacement, searchable and sortable.⌉[

History: every dry run and replacement, searchable and sortable.

## Installation

 1. Upload the plugin to `/wp-content/plugins/craftroq-relocate-db`, or install it 
    from the Plugins screen.
 2. Activate it.
 3. Open **Relocate DB** in the admin menu.

## FAQ

### Do I still need a backup?

Yes. Take a full database backup before replacing anything. The file of original
values covers what a replacement changed, but it is not a substitute for a backup.

### Can I undo a replacement?

There is no undo button. Each replacement can save the original value of everything
it changed to a downloadable `.sql.gz` file, and importing that file (for example
with phpMyAdmin, or `gunzip -c file.sql.gz | mysql your_database`) puts those values
back. It overwrites any edits made to those values since, so use it soon after the
replacement.

### Does it change serialized data safely?

Yes. Serialized values are rewritten with their lengths recalculated, and checked
to still be readable afterwards. Values that could not be changed safely are left
as they were and listed in the results.

### What happens if I close the page during a replacement?

The batch in progress either completes or is rolled back (on InnoDB tables, which
WordPress uses by default). Open the job from the Dashboard or History and continue
it: it picks up from the last completed batch.

### What happens if an import fails or I close the page?

Nothing in the tables your site uses has changed. The tables in the file are built
under temporary names and only put in place, all together, once the whole file has
run. A failed import can be resumed or discarded, and one whose page was closed 
is offered again on the Import screen. The database needs room for both copies until
the import finishes.

### Does it support Multisite?

No. Multisite is not supported. On a Multisite network the plugin does not run, 
and says so on the Plugins screen.

### Which tables does it search?

The tables you tick. By default those are the tables with your WordPress prefix.
Other tables in the same database can be added, and each table’s text columns can
be switched off one by one. The plugin’s own tables are never searched.

### How do I use it from WP-CLI?

wp crq search-replace https://staging.example.com https://example.com –dry-run shows
what would change. Without `--dry-run` the command asks for confirmation and applies
the dry run it just made. See `wp help crq search-replace` for all options.

### Does it send any data anywhere?

No. Everything happens in your own database. Nothing is sent to CraftRoq or anyone
else.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“CraftRoq Relocate DB” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ CraftRoq ](https://profiles.wordpress.org/craftroq/)

[Translate “CraftRoq Relocate DB” into your language.](https://translate.wordpress.org/projects/wp-plugins/craftroq-relocate-db)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/craftroq-relocate-db/),
check out the [SVN repository](https://plugins.svn.wordpress.org/craftroq-relocate-db/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/craftroq-relocate-db/)
by [RSS](https://plugins.trac.wordpress.org/log/craftroq-relocate-db/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.0

 * Removed unused styles and code. No change to how the plugin works.

#### 1.0.0

 * First release: search and replace with dry runs, serialized data and JSON support,
   database import and export, history, and WP-CLI commands.

## Meta

 *  Version **1.1.0**
 *  Last updated **18 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.5 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 8.1 or higher **
 * Tags
 * [database](https://wordpress.org/plugins/tags/database/)[migration](https://wordpress.org/plugins/tags/migration/)
   [search replace](https://wordpress.org/plugins/tags/search-replace/)[serialized](https://wordpress.org/plugins/tags/serialized/)
   [urls](https://wordpress.org/plugins/tags/urls/)
 *  [Advanced View](https://wordpress.org/plugins/craftroq-relocate-db/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/craftroq-relocate-db/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/craftroq-relocate-db/reviews/)

## Contributors

 *   [ CraftRoq ](https://profiles.wordpress.org/craftroq/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/craftroq-relocate-db/)