So we were eager to test the multi-site functionality of Wordpress 3.0 beta. While it’s not for the average end-user to toy around with and most may not even need this function, setting it up in not very difficult either. However our goal was to use the multi-site functionality on TLD (or stand-alone/add-on domains) and not on a sub-domain or sub-directory hierarchy. Here’s a step-by-step walkthrough. Please understand that this is not for the average wordpress user but for webmasters who know what they are doing and talk the jargon.
-
Setting up the domains
This section will deal with configuring the domains.
-
Installing Wordpress
This section will deal with configuring the wordpress installation.
-
Domain Mapping
This section will deal with configuring the secondary sites on their own domain (instead of subdomain or subdirectory)
-
Setting up the domains:
- Setup your main domain. This may involve the basics like registering it, setting up the nameservers, setting up the hosting etc. Once you have the hosting setup and you are ready to upload the files, follow these steps before installing Wordpress.
- Let’s refer to your primary domain as www.primarydomain.com and let us refer to your secondary domain as www.secondarydomain.com.
- Wildcard DNS: Create a subdomain on your primarydomain.com called “*” (without quotes). This will make sure that <some-random-sub-domain>.primarydomain.com does not return a 404 error.
- Park your secondary domain: Add www.secondarydomain.com as a parked domain in your account.
-
Install Wordpress
- Install Wordpress 3 at www.primarydomain.com as instructed in the official documentation and setup your first site.
- Add the following line to your wp-config.php file
define('WP_ALLOW_MULTISITE', true); - In the wordpress admin section go to Tools > Network. Choose subdomains amongst sub-domains and sub-directories. Follow the instructions on the screen to finish the network setup.
- Once you finish the network setup you’ll have the Super Admin menu activated on the admin screen.
- Go to Super Admin > Sites. Add a new site (for the secondary domain). For now we’ll have to set it up as a subdomain and we’ll later map it to the main domain. Let’s create it as secondary.primarydomain.com.
- Browse to this site and verify that everything is fine.
-
Domain Mapping
- Download the wordpress-mu-domain-mapping plugin. Extract it to a temporaty folder.
- Upload sunrise.php to wp-content.
- Upload domain_mapping.php to wp-content/plugins/
- Edit wp-config.php and add
define('SUNRISE','on');and use the “Network Activate” option to activate it (find it on the plugins manager page). - Set the server Ip address to the ip address of www.primarydomain.com (find that by pinging www.primarydomain.com).
- Log into http://secondary.primarydomain.com/wp-admin
- Go to Tools > Domain Mapping
- Under “Add new domain” enter secondarydomain.com and check “Primary Domain for this blog”. Click “Add”.
- Now your secondary site will be available at www.secondarydomain.com instead of secondary.primarydomain.com.
I hope you find these instructions helpful.
Bookmark & Share —
Search for More
{ 11 comments… read them below or add one }
This plugin sounds great! I was just wondering if setting this up will interfere with other add-on domains that don’t use Wordpress/use a different installation?
Thankx, this article was really helpful, and very clear.
I will traduct it in French as soon as possible !
very very helpful. Thank you.
Thanks for this cool explanation. However I’m sort of stuck at the creating a wildcard dns. Please clarify step 1.3 and 1.4
Cheers
Dian
Diane: this may largely depend on your hosting provider. Basically you are creating a subdomain named “*”.
I get as far as uploading the amended wp-config.php to the server, and checking the plugins section. However, I cannot activate it. In the plugin manager, there is a tab for Drop-ins, and the message that appears is:
sunrise.php – Executed before Multisite is loaded.
I’m stuck!
Is there any way each of the mapped domains can have a different IP (Located on the same server)?
Thanks
I am unable to find .htaccess file in my root wordpress directory . I created few wordpress based websites. Now I want to have mutiple sites using wordpress3.0.1 . In the steps Tools–> Network–>……. there is one step to add something to .htaccess file in the wordpress root folder. And I am unable to find it. Please help me .
Thanks in advance,
Sweety.
sweety: the htaccess file exists only on Linux based hosting. Also you’ll have to configure your ftp client to show hidden files. You may want to call up your hosting provider for further details.
I have successfully enabled multisite, installed MU Domain Mapping and added a second site mapped to a new domain. Everything is working fine, but I have a question about privacy:
My original site is my business site and the new site is entirely personal, and supposed to be anonymous. However, when you watch the browser’s (firefox) path to the new site while it loads (in the address bar at the bottom), you can see it hit the original site address just before the plugin maps it to the new site domain. Occasionally when the servers are busy you can see “waiting for originalsite.com” before it gets mapped.
Is there any way to keep visitors to the new site from ever seeing the address of the original site?
Nice guide, but how would this affect SEO, if at all?