Last active
October 30, 2015 12:24
-
-
Save mgor/4a76017aeddc16f9342d to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
cmd="mysql -u ${MYSQL_USER} --password=${MYSQL_PASSWORD} ${MYSQL_DATABASE} -e" | |
table_prefix=$($cmd "show tables;" -N -B 2>/dev/null | tail -1 | awk -F\_ '{print $1}') | |
$cmd "update ${table_prefix}_options set option_value = 'http://localhost' where option_name in ('siteurl', 'home');" 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment