diff --git a/bin/v-add-wordpress-admin b/bin/v-add-wordpress-admin index a5fb98a6..4fc71c05 100644 --- a/bin/v-add-wordpress-admin +++ b/bin/v-add-wordpress-admin @@ -53,7 +53,11 @@ if [ ! -d "/home/$user/web/$domain/public_html" ]; then exit 1; fi -# Check if WP CLI is installed and install it if not +if [ ! -f "/home/$user/web/$domain/public_html/wp-config.php" ]; then + echo 'Please install WordPress first.' + exit 1; +fi + if ! command -v wp &> /dev/null; then echo "WP CLI is not installed. Installing..." wget -nv https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /usr/local/bin/wp