From 385cbd41b47a1979681545ace94e827679771160 Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 9 Aug 2025 01:16:49 +0800 Subject: [PATCH] Fixed the sed commands --- scripts/wp-search-replace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" '