Last active
November 15, 2021 22:38
-
-
Save jaapmarcus/15dc6f0dc0116245d4a5f8493336609d to your computer and use it in GitHub Desktop.
Update Wordpress with command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source /etc/hestiacp/hestia.conf | |
source $HESTIA/func/main.sh | |
for user in $($BIN/v-list-users plain | cut -f1 ); do | |
for domain in $($BIN/v-list-web-domains $user plain | cut -f1); do | |
echo "Webdomain: $domain" | |
if [ -f "/home/$user/web/$domain/public_html/wp-config.php" ]; then | |
cd /home/$user/web/$domain/public_html/ | |
user_exec /usr/bin/wp core update | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
one line 5 it should be
for user in $($BIN/v-list-users plain | cut -f1 ); do