Update v-run-wpcli to use $phpver

This commit is contained in:
myvesta 2024-05-30 14:11:17 +02:00 committed by GitHub
commit d59c4fafe2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,12 +63,14 @@ if [ ! -d "/home/$user/web/$domain/public_html" ]; then
exit 1; exit 1;
fi fi
phpver=$(/usr/local/vesta/bin/v-get-php-version-of-domain "$domain")
#----------------------------------------------------------# #----------------------------------------------------------#
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
cd /home/$USER/web/$domain/public_html cd /home/$USER/web/$domain/public_html
sudo -u $USER wp $wp_command sudo -u $USER /usr/bin/php$phpver /usr/local/bin/wp $wp_command --skip-plugins=$(sudo -H -u$USER /usr/bin/php$phpver /usr/local/bin/wp plugin list --field=name | tr '\n' ',') --skip-themes;
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta # # Vesta #