Skip to content

Instantly share code, notes, and snippets.

@techkram
Created October 18, 2012 23:57
Show Gist options
  • Save techkram/3915483 to your computer and use it in GitHub Desktop.
Save techkram/3915483 to your computer and use it in GitHub Desktop.
WordPress Developer Script
#!/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