You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
725 B

#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. "${SCRIPT_DIR}/../settings.sh" || {
echo "no settings" && exit 1
}
TABLE_WP_OPTIONS="${TABLE_PREFIX}options"
TABLE_WP_POSTS="${TABLE_PREFIX}posts"
TABLE_WP_POSTMETA="${TABLE_PREFIX}postmeta"
wp search-replace "https://${PROD_DOMAIN}" "http://${LOCAL_DOMAIN}" ${TABLE_WP_OPTIONS} ${TABLE_WP_POSTS} ${TABLE_WP_POSTMETA} --report-changed-only=true
wp search-replace "https:\/\/${PROD_DOMAIN}" "http:\/\/${LOCAL_DOMAIN}" ${TABLE_WP_OPTIONS} ${TABLE_WP_POSTS} ${TABLE_WP_POSTMETA} --report-changed-only=true
wp search-replace "${PROD_DOMAIN}" "${LOCAL_DOMAIN}" ${TABLE_WP_OPTIONS} ${TABLE_WP_POSTS} ${TABLE_WP_POSTMETA} --report-changed-only=true