Wpadapt
Command line tool to adapt WordPress database sql files from one domain to another.
Install / Use
/learn @samhernandez/WpadaptREADME
WordPress Adapt
A simple executable to adapt an sql file dumped from WordPress from one domain to another. There are several robust tools out there that do this already. I just needed something quick, simple, and database-independent. This should work as a search/replace on any sql file with or without serialized data.
Put the wpadapt executable file somewhere in your system path.
Running wpadapt with no arguments shows this usage information:
usage: wpadapt [-i] -search=value -replace=value source_file target_file
options:
-search, -s Required search term to replace.
e.g. -s=remote.domain.com
-replace, -r Required replacement value for the search term.
e.g. -r=local.domain.dev
-i Optional. Triggers a case-insensitive search/replace.
examples:
wpadapt -search=old.domain.com -replace=new.domain.dev remote_db.sql local_db.sql
wpadapt -s=old.domain.com -r=new.domain.dev remote_db.sql local_db.sql
wpadapt -s=OLD.DOMAIN.COM -r=new.domain.dev -i remote_db.sql local_db.sql
Tested on a 15mb file, it runs in less than a second.
Improvements and suggestions welcome!
Related Skills
feishu-drive
345.4k|
things-mac
345.4kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
345.4kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
codebase-memory-mcp
1.1kHigh-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 66 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
