Skip to content

Instantly share code, notes, and snippets.

@lmullen
Created January 28, 2017 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmullen/9864243054a5a2d126727c908bbdf612 to your computer and use it in GitHub Desktop.
Save lmullen/9864243054a5a2d126727c908bbdf612 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
VER=$1
ZIP="wordpress-$VER.zip"
URL="https://wordpress.org/$ZIP"
echo "Trying to upgrade to WordPress $VER"
echo "Downloading $URL"
curl -O $URL
echo "Unzipping $ZIP"
unzip -q $ZIP
echo "Removing wordpress/wp-content"
rm -r ./wordpress/wp-content
echo "Moving new version of WordPress in place"
cp -Rf ./wordpress/* ./
echo "Cleaning up WordPress directory and zip file"
rm -r ./wordpress
rm $ZIP
echo "Upgrade WordPress at http://lincolnmullen.org/wprecover/wp-admin/upgrade.php"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment