Skip to content

Instantly share code, notes, and snippets.

@HoundstoothSTL
Created November 15, 2012 20:10
Show Gist options
  • Star 21 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save HoundstoothSTL/4080955 to your computer and use it in GitHub Desktop.
Save HoundstoothSTL/4080955 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
@qqpann
Copy link

qqpann commented Feb 9, 2017

Hi, curl -O doesn't work. You have to use crul -OL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment