Created
November 15, 2013 15:36
-
-
Save ayhanarda/7486259 to your computer and use it in GitHub Desktop.
Otomatik Wordpress Kurulumu
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 | |
########## | |
## Kurulum: Sisteminizde MAMP kurulu olduğunu varsayıyorum | |
## Kendinize göre geliştirebilirsiniz , problem değil | |
## Aşağıda Bunları Bul ve Kendince Değiştir: MYSQLUSER / MYSQLPASS | |
## | |
# ayhanarda.com - webhostingsitesi.com | |
## | |
######### | |
# Çalışma için geçici bir klasör oluşturalım | |
mkdir /tmp/getWP | |
cd /tmp/getWP | |
## Son sürüm wordpress'i indirelim | |
curl -O http://wordpress.org/latest.tar.gz | |
## Açalım | |
tar -xf latest.tar.gz | |
cd /tmp/getWP/wordpress/ | |
## wp-config dosyasını düzenleyelim | |
mv wp-config-sample.php wp-config.php | |
sed -i .bak "s/username_here/MYSQLUSER/g" wp-config.php | |
sed -i .bak "s/password_here/MYSQLPASS/g" wp-config.php | |
sed -i .bak "s/database_name_here/$1/g" wp-config.php | |
## Veritabanı Oluşturalım | |
CMD="create database $1" | |
/Applications/MAMP/Library/bin/mysql --host=localhost -uMYSQLUSER -pMYSQLPASS -e "$CMD" | |
## Geçici klasörden gerçek klasöre taşıyalım | |
mv /tmp/getWP/wordpress ~/Sites/$1 | |
## Firefox u açıp test edelim | |
open -a Firefox http://local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment