This will work for localhost on your computer and for SSH installs directly on the server.
1. Install Hombrew: http://brew.sh/
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. Once Homebrew is installed then get
brew install wget
1. Install wget: https://eternallybored.org/misc/wget/
2. Go to step 3
3. Once wget is installed, then you will be able to vert quickly download WordPress. Make a project folder and be inside the folder BEFORE using the wget command and address.
4. Unzip the file
5. Move files out of the /wordpress/ folder into chosen directory:
cp -rf ./wordpress/* ./
cp – copy command
-rf – forces everything to happen to interior files inside the directories
* – is the wildcard for everything
6. Delete (rm) the downloaded zip file and the wordpress directory that is empty:
rm -rf wordpress/
The project folder should have WordPress files and folders in place and ready for the localhost installation.