跳到内容

Swapline

v0.4.1

RebelCode · 2026年11月17日 上架

Search and replace across your database with serialized data and JSON handled safely, plus backups and safe imports for moving a site.

正在使用
10 以下
评分
暂无
累计下载
144
最近更新
2026年11月17日
需要 WordPress 6.2+已测试到 7.1.5PHP 8.0+

截图

Search and replace with two pairs, run on the tables you pick.
Search and replace with two pairs, run on the tables you pick.
A dry run reports the rows and cells that would change in each table.
A dry run reports the rows and cells that would change in each table.
The side-by-side diff of every changed cell, here a serialized value with its lengths rebuilt and a JSON-escaped URL.
The side-by-side diff of every changed cell, here a serialized value with its lengths rebuilt and a JSON-escaped URL.
History keeps recent runs, with undo and a restore button for the backup taken before a run.
History keeps recent runs, with undo and a restore button for the backup taken before a run.
Create, download, restore and delete backups.
Create, download, restore and delete backups.
Import a backup or SQL file, with an optional search and replace and your login kept.
Import a backup or SQL file, with an optional search and replace and your login kept.

Swapline finds and replaces text in your database tables. It’s built for moving a site to a new domain, switching to HTTPS, or fixing a string that appears in hundreds of places.

  • Choose the tables to process. The list shows each table’s size, with shortcuts for all tables and core tables only. On multisite you can filter the list by site.
  • Run several search and replace pairs in one pass. They’re applied in order, each on the result of the one before.
  • Limit a run, backup or import to the columns you name, or skip some.
  • Serialized data is rebuilt with correct lengths at any depth, including serialized strings stored inside other serialized strings. Objects are never instantiated.
  • JSON values, such as page builder data, are matched in their escaped form too, so https:\/\/example.com is found when you search for https://example.com.
  • Values that look serialized but are broken are left alone and counted in the report.
  • Case-insensitive matching and regular expressions, with the pattern checked before anything runs.
  • Dry runs report matched rows and cells per table.
  • “View exactly what changed” shows a side-by-side diff of every changed cell, with its table, row and column. The last five runs are kept in History.
  • Undo a live run from History. Each cell the run changed goes back to its earlier value, and cells edited since the run keep their newer value.
  • Save any number of named profiles and load them later.
  • Large tables are processed in batches with a progress bar. Tables without a primary key work too.
  • If a run is interrupted, for example by closing the tab, Swapline offers to resume it where it stopped.
  • On multisite, the tool lives in the network admin and super admins can pick tables from any site.
  • Back up the whole database or selected tables to a gzipped SQL file. Optionally apply a search and replace to the backup only, to move the site to a new domain without touching the live site.
  • Backups are stored in a folder with a random name in your uploads directory, with random file names and .htaccess and web.config rules that deny web access. If your web server serves files from that folder anyway, the Backup tab warns you so you can add a server rule. Download backups from the admin and keep as many as you like.
  • A live search and replace can back up the selected tables first. History links each run to that backup, with a button to restore it.
  • Restore any backup from the Backup list.
  • Import a .sql or .sql.gz file, or one of your backups, with an optional search and replace. Every statement is checked first, the data loads into temporary tables, and the live tables are swapped only when everything has loaded. If anything fails, the live database is untouched.
  • Importing can keep you logged in and keep the site’s address.
  • WP-CLI: wp swapline run, wp swapline backup and wp swapline import, with the same column options as the admin screen.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums