Update v-add-wordpress-admin

This commit is contained in:
isscbta 2024-05-22 17:51:42 +02:00 committed by GitHub
commit e51cd34f77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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