Created
February 13, 2018 09:49
-
-
Save ToX82/98747348e4ace0d06b240744961baf40 to your computer and use it in GitHub Desktop.
In a folder containing multiple wordpress installations, it cycles all of the websites and updates core, plugins and themes
This file contains 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 | |
echo "Updating wp-cli to its latest version..." | |
sudo wp cli update | |
echo "" | |
for d in */ ; do | |
user=$(stat -c '%U' $d) | |
echo "" | |
echo "Entering $d with user $user..." | |
cd $d | |
sudo -u $user wp core update | |
sudo -u $user wp plugin update --all | |
sudo -u $user wp theme update --all | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment