Last active
September 12, 2015 18:51
-
-
Save fjarrett/591aca0fc1e75df77846 to your computer and use it in GitHub Desktop.
Update core on every virtual host running 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
#!/bin/bash | |
for DIR in /var/www/*/public_html; do | |
cd $DIR | |
if [ -f "wp-config.php" ]; then | |
echo "cd $DIR" | |
sudo -u www-data wp core update | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment