Skip to content

Instantly share code, notes, and snippets.

@danny-allen
Forked from HoundstoothSTL/wp-download.sh
Created June 1, 2016 14:04
Show Gist options
  • Save danny-allen/697089c8717895c47e42e09c01305187 to your computer and use it in GitHub Desktop.
Save danny-allen/697089c8717895c47e42e09c01305187 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