Skip to content

Instantly share code, notes, and snippets.

@mexiter
Forked from HoundstoothSTL/wp-download.sh
Created May 14, 2016 20:09
Show Gist options
  • Save mexiter/e33c5625b3d6358219130dc92099e223 to your computer and use it in GitHub Desktop.
Save mexiter/e33c5625b3d6358219130dc92099e223 to your computer and use it in GitHub Desktop.
Download Wordpress through terminal and cleanup
#!/bin/bash
#Download the latest copy of WordPress into a directory, grab all the files in the new /wordpress folder
#Put all the files in the current directory, remove the now empty /wordpress directory
#Remove the tarball
#download latest wordpress with wget
wget http://wordpress.org/latest.tar.gz
#OR using CURL
#curl -O http://wordpress.org/latest.tar.gz
#De-compress the tarball
tar -zxvf latest.tar.gz
#Copy everything from the new WordPress Directory into current directory
cp -rvf wordpress/* .
#Remove the wordpress folder
rm -R wordpress
#remove the tarball
rm latest.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment