{"id":381355,"date":"2026-10-07T21:26:19","date_gmt":"2026-10-07T21:26:19","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/craftroq-relocate-db\/"},"modified":"2026-10-07T23:06:19","modified_gmt":"2026-10-07T23:06:19","slug":"craftroq-relocate-db","status":"publish","type":"plugin","link":"https:\/\/sq.wordpress.org\/plugins\/craftroq-relocate-db\/","author":23579119,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"1.1.0","tested":"7.1.3","requires":"6.5","requires_php":"8.1","requires_plugins":null,"header_name":"CraftRoq Relocate DB","header_author":"CraftRoq","header_description":"Safely search and replace URLs and text across your WordPress database, with serialized data support, dry runs and an operation history.","assets_banners_color":"927c86","last_updated":"2026-10-07 23:06:19","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/www.craftroq.com\/product\/craftroq-relocate-db\/","header_author_uri":"https:\/\/craftroq.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":59,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"craftroq","date":"2026-10-07 21:25:57","revision":3733361},"1.1.0":{"tag":"1.1.0","author":"craftroq","date":"2026-10-07 23:06:19","revision":3733455}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3733361,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3733361,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3733361,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3733364,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3733364,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":3733361,"resolution":"1","location":"assets","locale":"","width":1470,"height":777},"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":3733361,"resolution":"2","location":"assets","locale":"","width":1456,"height":825},"screenshot-3.jpg":{"filename":"screenshot-3.jpg","revision":3733361,"resolution":"3","location":"assets","locale":"","width":1470,"height":777},"screenshot-4.jpg":{"filename":"screenshot-4.jpg","revision":3733361,"resolution":"4","location":"assets","locale":"","width":1456,"height":825},"screenshot-5.jpg":{"filename":"screenshot-5.jpg","revision":3733361,"resolution":"5","location":"assets","locale":"","width":1456,"height":825},"screenshot-6.jpg":{"filename":"screenshot-6.jpg","revision":3733361,"resolution":"6","location":"assets","locale":"","width":1470,"height":777},"screenshot-7.jpg":{"filename":"screenshot-7.jpg","revision":3733361,"resolution":"7","location":"assets","locale":"","width":1470,"height":777}},"screenshots":{"1":"Dashboard: start a search and replace, or pick up a recent job.","2":"Choose what to replace, up to 20 pairs at once, and which tables to look in.","3":"Live progress: the current table, rows scanned, changes found and time remaining.","4":"The dry run: what would change, with before and after examples. Nothing is written yet.","5":"Confirm before anything is written, and keep a file of the original values.","6":"Import \/ Export: download the database with the site address changed on the way out.","7":"History: every dry run and replacement, searchable and sortable."}},"plugin_section":[],"plugin_tags":[153,4155,12126,29608,539],"plugin_category":[59],"plugin_contributors":[284363],"plugin_business_model":[],"class_list":["post-381355","plugin","type-plugin","status-publish","hentry","plugin_tags-database","plugin_tags-migration","plugin_tags-search-replace","plugin_tags-serialized","plugin_tags-urls","plugin_category-utilities-and-tools","plugin_contributors-craftroq","plugin_committers-craftroq"],"banners":{"banner":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/banner-772x250.png?rev=3733364","banner_2x":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/banner-1544x500.png?rev=3733364","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/icon.svg?rev=3733361","icon":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/icon.svg?rev=3733361","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/screenshot-1.jpg?rev=3733361","caption":"Dashboard: start a search and replace, or pick up a recent job."},{"src":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/screenshot-2.jpg?rev=3733361","caption":"Choose what to replace, up to 20 pairs at once, and which tables to look in."},{"src":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/screenshot-3.jpg?rev=3733361","caption":"Live progress: the current table, rows scanned, changes found and time remaining."},{"src":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/screenshot-4.jpg?rev=3733361","caption":"The dry run: what would change, with before and after examples. Nothing is written yet."},{"src":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/screenshot-5.jpg?rev=3733361","caption":"Confirm before anything is written, and keep a file of the original values."},{"src":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/screenshot-6.jpg?rev=3733361","caption":"Import \/ Export: download the database with the site address changed on the way out."},{"src":"https:\/\/ps.w.org\/craftroq-relocate-db\/assets\/screenshot-7.jpg?rev=3733361","caption":"History: every dry run and replacement, searchable and sortable."}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>It is built for doing that on real sites without breaking them.<\/p>\n\n<h4>Preview first, always<\/h4>\n\n<p>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.<\/p>\n\n<h4>Serialized data and JSON handled properly<\/h4>\n\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n<h4>Made for large databases<\/h4>\n\n<p>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.<\/p>\n\n<h4>Safety measures<\/h4>\n\n<ul>\n<li>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.<\/li>\n<li>The original value of everything a replacement changes is saved to a downloadable file of SQL statements. Importing it puts those values back.<\/li>\n<li>The site address (siteurl and home) is changed last, so you are not logged out part-way through.<\/li>\n<li>Tables without a primary key or suitable unique key are skipped, because their rows cannot be updated one at a time safely.<\/li>\n<li>Post GUIDs are left alone unless you ask for them to be changed.<\/li>\n<li>Only administrators who can post unfiltered HTML can use it.<\/li>\n<\/ul>\n\n<h4>Also included<\/h4>\n\n<ul>\n<li>Up to 20 search and replace pairs in one job, applied together in a single pass.<\/li>\n<li>Choose the tables to search, and leave out individual columns.<\/li>\n<li>Case-insensitive and whole-word matching, and matching the http:\/\/ and protocol-relative versions of a URL.<\/li>\n<li>A live progress view with the current table, rows scanned, changes found and time remaining.<\/li>\n<li>A searchable, sortable history of every job, a log, and automatic clean-up. Old jobs can also be deleted by hand.<\/li>\n<li>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.<\/li>\n<li>Export and import the plugin's settings as a JSON file.<\/li>\n<li>WP-CLI commands: <code>wp crq search-replace<\/code> and <code>wp crq resume<\/code>.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin to <code>\/wp-content\/plugins\/craftroq-relocate-db<\/code>, or install it from the Plugins screen.<\/li>\n<li>Activate it.<\/li>\n<li>Open <strong>Relocate DB<\/strong> in the admin menu.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20still%20need%20a%20backup%3F\"><h3>Do I still need a backup?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20i%20undo%20a%20replacement%3F\"><h3>Can I undo a replacement?<\/h3><\/dt>\n<dd><p>There is no undo button. Each replacement can save the original value of everything it changed to a downloadable <code>.sql.gz<\/code> file, and importing that file (for example with phpMyAdmin, or <code>gunzip -c file.sql.gz | mysql your_database<\/code>) puts those values back. It overwrites any edits made to those values since, so use it soon after the replacement.<\/p><\/dd>\n<dt id=\"does%20it%20change%20serialized%20data%20safely%3F\"><h3>Does it change serialized data safely?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20i%20close%20the%20page%20during%20a%20replacement%3F\"><h3>What happens if I close the page during a replacement?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20an%20import%20fails%20or%20i%20close%20the%20page%3F\"><h3>What happens if an import fails or I close the page?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20support%20multisite%3F\"><h3>Does it support Multisite?<\/h3><\/dt>\n<dd><p>No. Multisite is not supported. On a Multisite network the plugin does not run, and says so on the Plugins screen.<\/p><\/dd>\n<dt id=\"which%20tables%20does%20it%20search%3F\"><h3>Which tables does it search?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"how%20do%20i%20use%20it%20from%20wp-cli%3F\"><h3>How do I use it from WP-CLI?<\/h3><\/dt>\n<dd><p>wp crq search-replace https:\/\/staging.example.com https:\/\/example.com --dry-run shows what would change. Without <code>--dry-run<\/code> the command asks for confirmation and applies the dry run it just made. See <code>wp help crq search-replace<\/code> for all options.<\/p><\/dd>\n<dt id=\"does%20it%20send%20any%20data%20anywhere%3F\"><h3>Does it send any data anywhere?<\/h3><\/dt>\n<dd><p>No. Everything happens in your own database. Nothing is sent to CraftRoq or anyone else.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Removed unused styles and code. No change to how the plugin works.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release: search and replace with dry runs, serialized data and JSON support, database import and export, history, and WP-CLI commands.<\/li>\n<\/ul>","raw_excerpt":"Safely search and replace URLs and text across your WordPress database, with dry runs, serialized data support and a full history.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/381355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=381355"}],"author":[{"embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/craftroq"}],"wp:attachment":[{"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=381355"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=381355"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=381355"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=381355"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=381355"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=381355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}