Skip to content

Instantly share code, notes, and snippets.

@ayhanarda
Created November 15, 2013 15:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayhanarda/7486259 to your computer and use it in GitHub Desktop.
Save ayhanarda/7486259 to your computer and use it in GitHub Desktop.
Otomatik Wordpress Kurulumu
#!/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