This script was made to aid the process of migrating PHP and MySQL based websites. It has additional features for WordPress but works for most other similar CMSes.
If you find a problem let us know in the issues area and if you can improve the code then please fork the repository and send us a pull request :)
- Migrate all your website files
- Upload the script to your web root (or the same folder as wp-config.php)
- Browse to the script's URL in your web browser
- Follow the on-screen instructions
- Run the CLI script from the command line like so:
./searchreplacedb2cli.php --host localhost --user root --database test --pass "pass" --charset utf\-8 --search "findMe" --replace "replaceMe"
- use the
--dry-run
flag to do a dry run without searching/replacing
You can use short form arguments too so --host
becomes -h
and so on.
If you use some dynamic processing to setup the database definitions in WordPress try using the 'filestream' branch. Let us know if you find any bugs or have any suggestions to improve it.