Files
wordpress-gitignore-and-quick/wordpress/quick/local/replace-domain.sh.example
dimti ed6c2ee369 + winter restore perms quick helper
* wordpress quick script moved into subfolder
2025-01-14 08:27:01 +03:00

16 lines
725 B
Bash

#!/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