Skip to content

Instantly share code, notes, and snippets.

@frankiejarrett
Last active September 12, 2015 18:51
Show Gist options
  • Select an option

  • Save frankiejarrett/1d30b2634caa81b0baca to your computer and use it in GitHub Desktop.

Select an option

Save frankiejarrett/1d30b2634caa81b0baca to your computer and use it in GitHub Desktop.
Update all themes on every virtual host running WordPress
#!/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 theme update --all
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment