if [[ $MULTISITE == true ]];then
echo "Checking the sites in imported database..."
DB_DOMAINS=($(wp site list --field=domain))
DB_DOMAINS="${DB_DOMAINS[@]##*/}"
echo "${DB_DOMAINS}"
else
echo "Checking the domain name in imported database..."
DB_DOMAIN=$(wp option get home)
DB_DOMAIN=${DB_DOMAIN/http\:\/\//}
DB_DOMAIN=${DB_DOMAIN/https\:\/\//}
echo "${DB_DOMAIN}"
fi
Code language: Bash (bash)
Leave a Reply