Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.