#! /bin/bash DB=$(grep DB_NAME wp-config.php | cut -d \' -f 4) DBuser=$(grep DB_USER wp-config.php | cut -d \' -f 4) DBpass=$(grep DB_PASSWORD wp-config.php | cut -d \' -f 4) DBhost=$(grep DB_HOST wp-config.php | cut -d \' -f 4) function WPinstallCheck { if [[ ! -f ./wp-config.php ]]; then echo "No WordPress installtion found in this DIR, script must be executed from user's WP directory." 1>&2 exit 1 2> /dev/null fi } function tPrefix { grep -i table_prefix wp-config.php | cut -d \' -f 2 } function defaultTheme { mysql -u $DBuser -p$DBpass <