Created
October 18, 2012 23:57
-
-
Save techkram/3915483 to your computer and use it in GitHub Desktop.
WordPress Developer Script
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 | |
# WordPress-Dev.sh | |
# | |
# Setupfile for new WordPress projects | |
# Author: Frank Lewandowski | |
# Contact: franky@techkram.de | |
# ------------------------------------------------------- | |
# Get Projectname | |
echo "" | |
echo "Your Projectname: " | |
read projectname | |
# ------------------------------------------------------- | |
# Make Projectfolder | |
mkdir /var/www/$projectname | |
echo "" | |
echo "Create folder /var/www/$projectname" | |
# ------------------------------------------------------- | |
# Copy latest WordPress Files | |
echo "" | |
echo "Copying WordPress Files from wordpress.org" | |
echo "Please be patient." | |
echo "" | |
wget -q http://wordpress.org/latest.zip | |
# ------------------------------------------------------- | |
# Unzip WordPress Files | |
echo "Unzipping files" | |
echo "" | |
unzip -q latest.zip | |
sleep 5 | |
# ------------------------------------------------------- | |
#Copy Files to Projectfolder | |
echo "Copying Files to Projectfolder" | |
echo "" | |
cd wordpress/ | |
cp *.* /var/www/$projectname | |
sleep 5 | |
# ------------------------------------------------------- | |
# Cleanup | |
echo "Cleaning up files" | |
echo "" | |
cd .. | |
rm -r latest.zip | |
rm -r wordpress/ | |
# ------------------------------------------------------- | |
# Finish | |
echo "Project > $projectname < created under /var/www/$projectname" | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment