Skip to content

Instantly share code, notes, and snippets.

@jaapmarcus
Last active November 15, 2021 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaapmarcus/15dc6f0dc0116245d4a5f8493336609d to your computer and use it in GitHub Desktop.
Save jaapmarcus/15dc6f0dc0116245d4a5f8493336609d to your computer and use it in GitHub Desktop.
Update Wordpress with command line
#!/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
@alber-khan
Copy link

alber-khan commented Nov 15, 2021

one line 5 it should be

for user in $($BIN/v-list-users plain | cut -f1 ); do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment