Quick script to install WordPress from the Linux command line

I find that it is much faster to download and install WordPress from the command line in Linux than attempting to use FTP

By running the following script in a new directory, you will:

  • download the latest version of WordPress
  • untar / unzip it
  • move the files into the current directory
  • cleanup the unused empty directory
  • and update the ownership of all of the files to match the directory you are already in.
wget https://wordpress.org/latest.tar.gz
tar -xvzf latest.tar.gz
mv wordpress/* .
rm -rf wordpress/ latest.tar.gz
chown -R `stat . --printf '%u.%g'` *