Skip to content

Instantly share code, notes, and snippets.

@yigitbey
Created October 4, 2010 17:24
Show Gist options
  • Save yigitbey/610099 to your computer and use it in GitHub Desktop.
Save yigitbey/610099 to your computer and use it in GitHub Desktop.
#!/bin/bash
#Usage: ./wordpresskur kulup_adi kulup_sifresi
KULUP=$1
SIFRE=$2
KLASOR="/home/$KULUP/public_html/"
ESSIZ=`head /dev/urandom | md5sum`
svn co http://core.svn.wordpress.org/trunk/ $KLASOR
mv $KLASOR/wp-config-sample.php $KLASOR/wp-config.php
sed -i "s/database_name_here/$KULUP/g" $KLASOR/wp-config.php
sed -i "s/username_here/$KULUP/g" $KLASOR/wp-config.php
sed -i "s/password_here/$SIFRE/g" $KLASOR/wp-config.php
sed -i "s/put your unique phrase here/$ESSIZ/g" $KLASOR/wp-config.php
curl -d "admin_email=$KULUP@isik.edu.tr&admin_password=$SIFRE&admin_password2=$SIFRE&weblog_title=$KULUP Kulubu" http://$KULUP.isikun.edu.tr/wp-admin/install.php?step=2
chown -R $KULUP:$KULUP $KLASOR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment