WordPress get domain(s) from database

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)


Posted

in

, ,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *