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

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