Last active
December 21, 2021 07:05
-
-
Save iworks/cf653ff02e187d89eb1f410c5772c85e to your computer and use it in GitHub Desktop.
Find and update WordPress
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
#!/usr/bin/env bash | |
# Marcin Pietrzak | |
# http://iworks.pl/ | |
if ! command -v wp &> /dev/null | |
then | |
echo "wp could not be found! is wp-cli installed & configured?" | |
exit | |
fi | |
ROOT=/var/virtuals | |
for f in $(find ${ROOT} -type f -name wp-config.php) | |
do | |
DIR=$(dirname $f) | |
cd ${DIR} | |
wp core update | |
wp plugin update --all | |
wp theme update | |
wp language theme update --all | |
wp language plugin update --all | |
wp language core update | |
done | |
cd - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment