Skip to content

Instantly share code, notes, and snippets.

@kristijandraca
Created September 27, 2021 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristijandraca/1aa7668dce9c32ca4d58386e13e4a260 to your computer and use it in GitHub Desktop.
Save kristijandraca/1aa7668dce9c32ca4d58386e13e4a260 to your computer and use it in GitHub Desktop.
Download and extract latest wordpress
#!/bin/bash
if [ $# -eq 0 ]
then
echo 'Provide folder name as first parameter'
exit 1
fi
if [ -d $1 ]; then
echo 'Folder alrady exists!'
exit 1
fi
wget https://wordpress.org/latest.zip
mkdir -m 777 $1
cd $1
unzip ../latest.zip
cd wordpress
mv ./* ../
cd ..
rm -rf wordpress
cd ..
rm latest.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment