mysql-search-replace
« Back to VersTracker
Description:
Database search and replace script in PHP
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Databases
Tags: wordpress database migration php cli
Install: brew install mysql-search-replace
About:
MysqlSearchReplace is a powerful PHP script designed to search and replace strings in WordPress databases safely and efficiently. It handles serialized data structures, ensuring that data integrity is maintained during migrations or URL updates. This tool is essential for developers moving WordPress sites between domains or environments.
Key Features:
  • Handles serialized PHP data structures automatically
  • Dry run mode to preview changes before executing
  • Command-line interface (CLI) for scripting and automation
  • Supports both MySQL and MySQLi connections
Use Cases:
  • Migrating WordPress sites between domains or URLs
  • Updating database references after changing file paths
  • Cleaning up test data in development environments
Alternatives:
  • wp-cli search-replace – WP-CLI is a native WordPress command-line tool that offers similar functionality but requires WordPress to be installed and configured.
  • sed – Standard Unix stream editor, but it cannot handle serialized PHP data, making it risky for WordPress databases.
Version History
Detected Version Rev Change Commit