Skip to content

Instantly share code, notes, and snippets.

@javierwilson
Created April 24, 2012 15:20
Show Gist options
  • Save javierwilson/2480552 to your computer and use it in GitHub Desktop.
Save javierwilson/2480552 to your computer and use it in GitHub Desktop.
actualizacion de varios sitios de wordpress
#!/bin/bash
SRC=/tmp/wordpress
DST=/var/www
SITES=( example.com example.org example.net )
for site in ${SITES[@]}; do
echo "Upgrading $site"
dir="$DST/$site/public_html"
bak="$DST/$site/public_html.bak"
# backup
cp -fr $dir $bak
# renueva wp-cinludes y wp-admin
rm -fr $dir/{wp-includes,wp-admin}
cp -fr $SRC/{wp-includes,wp-admin} $dir/
# copy new files in wp-content and root
cp -fr $SRC/wp-content/* $dir/wp-content/
cp -f $SRC/* $dir/
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment