Created
February 7, 2012 15:15
-
-
Save wesbos/1760164 to your computer and use it in GitHub Desktop.
gsed wordpress DB to production
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple little snippet that I always forget. I use this to quickly find/replace all references to any paths within a wordpress DB when migrating. Much faster than using a GUI | |
You must have gsed installed, used macports to do this. Native osx sed sucks. | |
usage: gsed -i 's/[old-url]/[new-url]/gi' database-name.sql | |
Example: | |
gsed -i 's/localhost\/wordpress-local\/subfolder/production.com/gi' livedb.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment