Multisite dengan Domain Mapping Plugin WordPress

Domain Mapping

Domain Mapping


Sebelum melakukan mapping,yang perlu diperhatikan adalah pastikan bahwa domain yang akan dibuat mengarah ke domain utama kita. Dengan kata lain,misalnya domain utama adalah antzone.web.id yang sudah berjalan dengan wordpress dan kita ingin mapping domain store.antzone.web.id ke domain antzone.web.id tadi. Syaratnya adalah kita telah mensetting DNS untuk store.antzone.web.id mengarah pada antzone.web.id pada DNS Server.


$TTL 86400
@       IN      SOA     ns.antzone.web.id. antzone.web.id. (
                2006070505 ; serial
                28800
                14400
                3600000
                86400
                )

                IN      NS      ns.antzone.web.id.
                IN      MX      10 mail.antzone.web.id.
                IN      A       192.168.1.100

ns              IN      A       192.168.1.100
mail            IN      A       192.168.1.101
www             IN      A       192.168.1.100
store           IN      CNAME   www

Plugin ini memisahkan situs utama denga situs lainnya,untuk melakukannya domain harus mengirim terlebih dahulu ke situs wordpress utama dimana wordpress telah di install. Untuk menerapkannya maka bisa menggunakan plugin WordPress MU Domain Mapping plugin. Plugin ini memungkinkan pengguna wordpress untuk memetakan blog mereka ke situs domain lain,tanpa harus menginstall wordpress lagi,jadi cukup 1 instalan wordpress untuk beberapa domain yang sudah di daftarkan pada DNS Server.

Setelah kita selesai menginstall WordPress MU Domain Mapping plugin pada server wordpress, buka wordpress/wpcontent/plugins/,disana terdapat sunrise.php,pindahkan file sunrise.php ke wordpress/wpcontent . Setelah itu yang perlu dilakukan adalah mengedit file wp-config.php yang ada di root folder

wpcontent

wpcontent


wordpress. Tambahkan perintah ini dibawah define(‘WP_DEBUG’, false);


define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'antzone.web.id' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
define( 'SUNRISE', 'on' );

Dan juga perlu dilakukan adalah mengedit file .htaccess agar permalinks sesuai dengan domain yang telah kita setup sebelumnya


# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]



# END WordPress

Jika instalasi belum berhasil ketika akan masuk ke wp-admin maka akan muncul error untuk mengaktifkan network mapping.Catatan, plugin yang sudah active di disable dulu semuanya sebelum mengaktifkan lugin networknya.Jika instalasi berhasil maka akan muncul seperti gambar dibawah.Dipojok kanan atas account wordpress kita.

network admin

network admin

Tampilan Network Admin

dashboard network admin

dashboard network admin

Site List

Site List

Untuk mengatur quota dan file max-upload,pergi ke option setting

upload setting

upload setting

Untuk Settingan Domain Mapping sbb:

domain mapping

domain mapping


Jika permanen redirect di aktifkan maka,akan mendaftar secara otomatis di domain anda. Tidak perlu mensetting apache konfigurasinya lagi.Dengan catatan,semua sub domain dan semua path akan mengarah ke wordpress.

Catatan:
Jika tidak bisa masuk/blank (403) ke menu wp-admin,bisa ditambahkan ke settingan apache servernya,edit file site yang di enablekan.Contoh Setting



ServerName ns.antzone.web.id
NameVirtualHost *:80

<VirtualHost *:80>
ServerName antzone.web.id //nama web domainnya
ServerAdmin hostmaster@antzone.web.id

DocumentRoot /var/www/wordpress
<Directory "/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all


<Directory /var/www/wordpress>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

ServerSignature On
ErrorLog /var/log/apache2/error.log

</VirtualHost>
<VirtualHost *:80>
ServerName store.antzone.web.id //nama web sub domainnya
ServerAdmin hostmaster@antzone.web.id

DocumentRoot /var/www/wordpress
<Directory "/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all


<Directory /var/www/wordpress>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

ServerSignature On
ErrorLog /var/log/apache2/error.log

</VirtualHost>
This entry was posted in Wordpress and tagged , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

4 Responses to Multisite dengan Domain Mapping Plugin WordPress

  1. arie says:

    tutornye bagus bang,,, makasih nyahh :), kalo di buat multi site dengan single login bisa gak yah?

    • admin says:

      bisa,sebagai admin domain utama akan mendapat hak akeses penuh terhadap akses ke setiap sub domainnya,tinggal setting di dasboard network admin sajah

  2. batu mulia says:

    Great blog! Do you have any tips and hints for aspiring writers?
    I’m hoping to stfart my own blog soon but I’m a little lost
    onn everything. Would you suggest starting with a free platform like WordPress
    oor ggo for a paid option? There aare so many choices out there that I’m totally overwhelmed ..
    Any suggestions? Cheers!

  3. I blog frequently and I really appreciate your content.
    This great article has truly peaked my interest.
    I’m going to book mark your website and keep checking for
    new information about once a week. I subscribed to
    your RSS feed as well.

Leave a comment