Created
February 13, 2018 09:56
-
-
Save ToX82/12a75951c1f028ce363b264750ee23a9 to your computer and use it in GitHub Desktop.
Just one shell command to install wordpress and a few plugins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Please note that this script downloads the italian localization of wordpress. | |
# Please check on line 21 if this doesn't suit you. | |
if [ $# -eq 0 ]; then | |
echo "You didn't specify in which directory you want wordpress to be installed!" | |
exit 1 | |
fi | |
cd $1 | |
function getPlugin { | |
echo " ... installing $1 ... " | |
sudo wget -q -O plugin.zip https://downloads.wordpress.org/plugin/$1.zip | |
sudo unzip -qq plugin.zip -d "wp-content/plugins" | |
sudo rm plugin.zip | |
} | |
OWNER=$(ls -ld | awk '{print $3}' | tail -1); | |
echo "Installing wordpress core..." | |
sudo wget -q -O wordpress.tar.gz https://it.wordpress.org/wordpress-latest-it_IT.tar.gz | |
sudo tar xfz wordpress.tar.gz | |
sudo mv wordpress/* ./ | |
sudo rm -rf wordpress | |
sudo rm wordpress.tar.gz | |
echo "Installing plugins..." | |
getPlugin cookiebar | |
getPlugin wordpress-seo | |
getPlugin better-wp-security | |
getPlugin automatic-updater | |
getPlugin wp-fastest-cache | |
echo "Removing old themes and useless things..." | |
sudo rm wp-content/plugins/hello.php | |
sudo rm -rf wp-content/themes/twentyfifteen/ | |
sudo rm -rf wp-content/themes/twentysixteen/ | |
sudo chown -R $OWNER:$OWNER ./ | |
echo "DONE!!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment