diff --git a/bin/v-install-wordpress b/bin/v-install-wordpress index 0e24f847..4bf82c5f 100644 --- a/bin/v-install-wordpress +++ b/bin/v-install-wordpress @@ -26,6 +26,7 @@ USER=$user # Includes source /usr/local/vesta/func/main.sh source /usr/local/vesta/func/db.sh +source /usr/local/vesta/conf/vesta.conf if [ -z "$user" ]; then check_result $E_NOTEXIST "domain $domain doesn't exist" @@ -49,7 +50,11 @@ is_object_unsuspended 'user' 'USER' "$user" source /usr/local/vesta/func/handle_parameters.sh if [ -z "$database" ]; then - database=$(echo "$domain" | sed 's#\.#_#g') + if [ ! -z "$MAX_DBUSER_LEN" ] && [ "$MAX_DBUSER_LEN" -ge 80 ]; then + database=$(echo "$domain" | sed 's#\.#_#g') + else + database="wp" + fi fi if [ -z "$email" ]; then