Skip to content

Instantly share code, notes, and snippets.

@Strae
Created February 18, 2016 16:12
Show Gist options
  • Save Strae/428e2c2928c6a3de1c4e to your computer and use it in GitHub Desktop.
Save Strae/428e2c2928c6a3de1c4e to your computer and use it in GitHub Desktop.
Commands to change the domain of a wordpress site acting on the database.
# Remember to escape the dots!! example.com become example\.com
# db.sql the original wordpress db
# dump_02.sql the final one
# cmon its kinda easy, this is just a reminder.
sed 's|http://OLD|http://NEW|g' db.sql > dump_01.sql
sed 's|OLD|NEW|g' dump_01.sql > dump_02.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment