Deemas Fashion Postal Address (Appointment Only)
___ Station Road, New York, 11755,
New York, United States
Tel:- +1 212 288 4400
EMAIL sales@deemasfashion.us
#!/bin/bash # --- 1. CLEAN PATH DEFINITION --- # Only include directories. Do NOT include file names in the PATH string. export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # --- 2. CONFIGURATION --- PHP_BIN="/usr/bin/php" WP_PATH="/usr/local/bin/wp" WP_CMD="$PHP_BIN $WP_PATH" MASTER_PATH="/home/dmg165/public_html" MASTER_DOMAIN="deemasfashion.com" SQL_DUMP="/root/master_sync.sql" SITES=( "deemasfashion.ca|/home/dmg165ca/public_html|1.85|CA:ON" "deemasfashion.co.uk|/home/dmg165uk/public_html|1.00|GB:WMD" "deemasfashion.us|/home/dmg165us/public_html|1.36|US:NY" "deemasfashion.pk|/home/dmg165pk/public_html|350|PK:PB" "deemasfashion.com.au|/home/dmg165au/public_html|1.89|AU:VIC" ) echo "------------------------------------------------" echo "DEEMAS FASHION GLOBAL SYNC (V6.6 - THE SILENCER)" echo "------------------------------------------------" # Step 1: Export Master echo "Step 1: Exporting $MASTER_DOMAIN..." $WP_CMD db export $SQL_DUMP --path=$MASTER_PATH --allow-root --quiet --skip-plugins --skip-themes echo "Success: Exported to '$SQL_DUMP'." # Step 2: Loop through targets for SITE in "${SITES[@]}"; do IFS="|" read -r DOMAIN PATH RATE COUNTRY <<< "$SITE" echo ">>> Syncing $DOMAIN..." # Import - We force the environment to see /usr/bin where mysql lives env PATH=$PATH $WP_CMD db import $SQL_DUMP --path=$PATH --allow-root --quiet --skip-plugins --skip-themes # Search and Replace URL env PATH=$PATH $WP_CMD search-replace "$MASTER_DOMAIN" "$DOMAIN" --path=$PATH --allow-root --quiet --skip-plugins --skip-themes # Localize Settings via changes.php $WP_CMD eval "include_once ABSPATH . 'wp-content/themes/storefront-child/changes.php'; if(function_exists('df_get_config_v20')){ df_get_config_v20(); }" --path=$PATH --allow-root # Force WooCommerce Location $WP_CMD option update woocommerce_default_country "$COUNTRY" --path=$PATH --allow-root --quiet # Price Conversion if [ "$RATE" != "1.00" ]; then echo " Converting prices at $RATE rate..." env PATH=$PATH $WP_CMD db query "UPDATE i9ijjr_postmeta SET meta_value = ROUND(meta_value * $RATE) WHERE meta_key IN ('_price', '_regular_price', '_sale_price') AND meta_value REGEXP '^[0-9]+(\.[0-9]+)?$';" --path=$PATH --allow-root --quiet fi # Final Clean up $WP_CMD rewrite flush --path=$PATH --allow-root --quiet $WP_CMD cache flush --path=$PATH --allow-root --quiet echo "✓ $DOMAIN updated and localized." done # Cleanup if [ -f "$SQL_DUMP" ]; then rm -f "$SQL_DUMP" echo "✓ Temporary SQL dump removed." fi echo "------------------------------------------------" echo "GLOBAL SYNC COMPLETE"
___ Station Road, New York, 11755,
New York, United States
Tel:- +1 212 288 4400
EMAIL sales@deemasfashion.us