Skip to content

Instantly share code, notes, and snippets.

@JMichaelRoach
Created July 28, 2015 13:01
Show Gist options
  • Select an option

  • Save JMichaelRoach/6081a52e81de13135efc to your computer and use it in GitHub Desktop.

Select an option

Save JMichaelRoach/6081a52e81de13135efc to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ -d '../vhosts' ];
then
echo "Updating all WordPress sites ... press Ctrl-C to stop."
find . -maxdepth 1 -type d -exec update_wordpress {} \;
else
echo "This can only be run from the /var/www/vhosts folder"
pwd
fi
@JMichaelRoach

Copy link
Copy Markdown
Author

This is the "do all" version of update_wordpress which recurses through the /var/www/vhosts (or other specified) directory and runs the update_wordpress script.

On our server, this system processes about 150 WordPress sites in about 20 seconds.

NOTE: You'll need both this script and the update_wordpress script.

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