diff --git a/scripts/wp-search-replace.sh b/scripts/wp-search-replace.sh index b48b5d4..89d79e4 100644 --- a/scripts/wp-search-replace.sh +++ b/scripts/wp-search-replace.sh @@ -264,7 +264,7 @@ if [[ -f "$CONFIG_FILE" && -w "$CONFIG_FILE" ]]; then INSERT_BLOCK+="define( 'WP_SITEURL', '${TARGET_URL}' );\n" fi if [[ $needs_http_host -eq 1 ]]; then - INSERT_BLOCK+="if ( defined( 'WP_CLI' ) && WP_CLI && ! isset( $_SERVER['HTTP_HOST'] ) ) { $_SERVER['HTTP_HOST'] = '${HOST_ONLY}'; }\n" + INSERT_BLOCK+="if ( defined( 'WP_CLI' ) && WP_CLI && ! isset( \$_SERVER['HTTP_HOST'] ) ) { \$_SERVER['HTTP_HOST'] = '${HOST_ONLY}'; }\n" fi awk -v block="$INSERT_BLOCK" '