Multiple Domains on WPMu: Mission Accomplished!

Well, I hate to quote our fearless leader out of turn, but unlike him I really was successful!

Image of WPMuEd Site

I had blogged earlier this semester about the potential possibilities available to UMW if we were to pursue mapping multiple domains to one WordPress Multi-User installation–one install, one upgrade, one point of failure–the last one is a quote from Jerry :). It is something people had been working out on the WPMu forums and, as usual, Dr. Mike came up with the hack that was ultimately turned into a tutorial here and then, to make things even easier, a plugin here.

So, having all of these unbelievable resources I gave it a whirl. I discovered a few things that may be useful:

  1. First and foremost, you need a really cool hosting service that is willing to work with you (or you need your own server). Why? Well, CPanel cannot necessary take care of everything you need to do here. You need to park the add-on domain and point it to your existing WPMu installation (easy enough). However, you then have to create another Virtual Host for the new domain that has its own dynamic dns (I’m quickly getting out of my depth so let me use exmple from two people who know what they are talking about.

    Luke, from the premium.wpmudev.org forums offered me a nice conceptual overview of how this needs to be accomplished (thanks Luke!).

    In Apache’s configuration file, you should either have 2 virtual hosts (one for each domain) that point to the same file path (where mu is installed), or you should have added more domains to the ServerAlias directive in the vhost for the primary domain so that it looked like:

    ServerAlias domain1.tld *.domain1.tld www.domain2.tld domain2.tld *.domain2.tld

    Also note that you would still need to create the wildcard DNS, which “may” take a day or two to propagate and become available. It shouldn’t take that long, but it might depending on several factors.

    As long as the dns points to the server, then apache points it to the right file path, MU will take care of the rest.

    And for those of you who understand Apache (which I don’t enirely) here is the code we used for our WPMu installation with multiple domains:


    ServerAlias www.umwblogs.org *.umwblogs.org
    ServerAdmin  webmaster at umwblogs.org
    DocumentRoot /home/umwblogs/public_html
    ServerName umwblogs.org
    ServerAlias wpmued.org www.wpmued.org
    ServerAlias *.wpmued.org
    User umwblogs
    Group umwblogs
    BytesLog /usr/local/apache/domlogs/umwblogs.org-bytes_log
    CustomLog /usr/local/apache/domlogs/umwblogs.org combined
    ScriptAlias /cgi-bin/ /home/umwblogs/public_html/cgi-bin/

    This worked and was by far the most difficult part of the process because it is not exactly something you can do on your own if you are on a hosted web server, and it really requires an administrator who is willing to work with you, lucky we have the coolest guy in town with Zach Davis of Cast Iron Coding–thanks again Zach!

  2. The Multi-Site Manager plugin works extremely well, but there is at least one thing you have to do in the database to make it work successfully–see #3. Once you have created a blog with your new domain name (for example the domain wpmued.org would have the correlating blog on the existing WPMu install: wpmued.umwblogs.org) and added the plugin to your mu-plugins folder you will see a “Sites” subtab within the Site Admin tab. When you click on the “Sites” subtab you will see the following fields where you need to enter the appropriate information:
    1. “Site Name” (what to call your site)
    2. the “Domain” field will have the URL of the domain you have parked and pointed to the existing WPMu installation
    3. The “path” field where you need to enter a single forward slash “/” (no quotes)

    After this, map your new domain.

    Image of Sites tab in Wp-Admin

    There is also another feature for this plugin that allows you to clone your existing installation–very useful! Keep in mind, however, that the site-admins table does not clone and we are going to have to go in to the database and create this for ourselves. Next stop is the WPMu database, but note the new domain ID number (mine above is 683) before you proceed to the database (it will save you some time and effort).

  3. Creating the site-admins in the WPMu database is the final step and this is where Richard’s tutorial came in quite useful. You have to have access to a PHPmyadmin to do what he outlines in steps 26 through 30, but if you follow these steps to create the site_admins table you will then be able to see the Site Admin tab and effectively administer your mapped domain. After that, you can change the settings for all the particular options such as illegal domains, allowed file types, etc. from the Site Admin–>Options tab.
  4. Related posts

16 Responses to “Multiple Domains on WPMu: Mission Accomplished!”


  1. 1 Alan Levine Nov 18th, 2007 at 10:41 am

    Good stuff, Sir James. The Apache stuff makes sense, but it would be rare, very rare, on a hosted domain site hat you could do this without the divine intervention you received.

    As I am reading the links provided, it seems all of this is geared to work with new or existing WPMU sites- anything on how you would rope in a corral of say 5 regular WP sites? Can they be imported?

  2. 2 Reverend Nov 18th, 2007 at 11:24 am

    Alan,

    Rare, indeed, for a hosted domain, and I think I put some strain on my friendship with Zach while I scavenged around for the code and tried to fully explain myself. He’s a mensch, and was quite tolerance of my ignorance. Fact is, I was obsessed to see how it worked, and I think his interest in WPMu might have been piqued a bit by this feature as well (or at least it would shut me up for a while). Some version of this must be how WordPress.com allows you to map a domain to their server, and it “trickled down” to the Open Source community via the forums thanks to some smart folks.

    That said, five different sites might be a bit different and more difficult. I wonder if the export for each site into the WPMu environment would work? You can copy over sites once they have been created making a test run possible before the “scary” process of parking the four other domains. There is a more robust export for WPMu developed here that gets pages and links as well (something the existing neglects last I checked). It may not be the best or cleanest option, but I haven’t read much about combining databases for existing sites. Some folks have posted about it on the forums, and others have steered clear. That said, I believe it could be done, and who better than the Big Dog to do it. Show the wag, and I’ll do the barking ;)

  3. 3 Bart Dec 5th, 2007 at 9:42 pm

    so I just went though the process.. I used the directory method instead of the subdomain… my question is do we lose the ability to track per account stats… meaning through cpanel i can nolonger see webalizer stats for each domain… they’re all together now… not ahuge deal cause i use analytics but would be nice if there was a way to get this working as well.. I do have root access to my vps box… any thoughts?

  4. 4 Bart Jan 18th, 2008 at 12:14 pm

    hi there I’ve lost some major rankings because of lack of www prefix… is there anyway I can implement this while still adding the www prefix? if i use htaccess right now I just get into a infinite loop… pls help thank you

  5. 5 Reverend Jan 18th, 2008 at 1:22 pm

    Bart,

    I’m not sure how you would do that, wpmued.org reads the http://www.wpmued.org address and forwards it to wpmued.org, which I imagine is accounting for the rankings loss. This is a good question, but I’m not sure I can answer it. I’ll probably have to go to the wpmu forums much like you.

    Sorry.

  6. 6 John Jan 29th, 2008 at 8:03 pm

    Hi,

    Thanks for the great post.

    Is it possible to use unique IPs for all domains with this method?

    Thanks.

  7. 7 Reverend Feb 1st, 2008 at 1:11 am

    John,

    Sorry for the delayed response. I don’t think it’s possible to use unique IPs for each of these domains, but I will double check with someone who actually knows what he is talking about. I am planning on doing some more serious experimentation with this method now that it works and I have a little more time, and will post about it as soon as I have something worthwhile to share.

    Jim

  8. 8 Andrea Mar 4th, 2008 at 2:02 pm

    To answer the IP question: no you can’t use a unique IP for each mapped domain. They all point to the same one.

  9. 9 Johan Apr 29th, 2008 at 1:22 pm

    Hi Jim.

    Thanks for this. I am using Hostgator and battling to get this done. Hostgator want to charge me to do it. But I get the feeling they have no idea as well. I have used the tutorial and the plugin. But my new site points to my original site I created with hostgator. I cannot get into the back end of the new MU site.

    For the hack of me I can also not find the wp_blogs and wp_signups tables when I use phpmyadmin.

    I will rather pay you to help me because then I may know how to do it in the future ;-)

    Have fun

  10. 10 Johan Apr 30th, 2008 at 1:05 am

    Hi Jim I am getting closer to getting this done but I think my phpmyadmin is different to the one show on the tutorial and I get stuck at step 22.

  11. 11 Reverend Apr 30th, 2008 at 8:45 pm

    Hey Johan,

    Sorry for the delay, I have been trying to wrap up projects for this semester, and it got me behind the 8 ball the last few days.

    Ok, step 22 is tripping you up. Let’s take a look at that together. In phpMyAdmin you should have two pages of tables when you go into your WPMu database (and far more if you have many. many blogs -how many do you have?). The ‘My Site’ table for me is on the second page of tables, so finding it may be as simple as clicking the double arrow key at the bottom of the phpMyAdmin page. If this doesn’t work, or if you still can’t see it, IM me tonight or tomorrow and we’ll take a look together.

    Also, get me a picture of what you do see if you can. I know how frustrating this process can be, and I’ll help in anyway I can.

    Jim

  1. 1 Bava Going Black at bavatuesdays Pingback on Dec 13th, 2007 at 11:54 am
  2. 2 domain parking tip Trackback on Dec 19th, 2007 at 11:01 am
  3. 3 Porting bavatuesdays to a mapped domain on WPMu at bavatuesdays Pingback on Mar 2nd, 2008 at 3:49 am
  4. 4 » Porting bavatuesdays to a mapped domain on WPMu WPMu Ed Pingback on Mar 2nd, 2008 at 10:30 am
  5. 5 Importing a single WP blog to a WPMu Installation at bavatuesdays Pingback on Mar 4th, 2008 at 1:41 pm

Leave a Reply




EDUPUNK: DIY EdTech

about

bavatuesdays.com is an ongoing conversation about media of all kinds ...

Testimonials:

Generations from now, they won't call it the Internet anymore. They'll just say, "I logged on to the Jim Groom this morning.
-Joe McMahon
Everything Jim Groom touches is gold. He's like King Midas, but with the Internet.
-Serena Epstein

I am Jim Groom

Find out more about me here.

browse the bavarchive

I'm a twit

random gems from bavarchive

Tomu Uchida: Japanese Master Pamphlet (pgs 1,4) Add RSS Feed God Don't Make No Junk! Odd Dashboard Message about Simple tags Domain Mapping Tab bavatuesdays a WPMu site
View more photos >

My netflix


Grizzly ManThe HitcherMy Neighbor Totoro

Polls

What are your five favorite film adaptations of a Stephen King novel or story?

  • The Shining (1980) by Stanley Kubrick (23%, 34 Votes)
  • Shawshank Redemption (1994) by Frank Darabont (21%, 32 Votes)
  • Stand by Me (1986) by Rob Reiner (18%, 27 Votes)
  • Misery (1990) by Rob Reiner (17%, 25 Votes)
  • The Green Mile (1999) by Frank Darabont (13%, 19 Votes)
  • Carrie (1976) by Brian DePalma (11%, 17 Votes)
  • The Dead Zone (1983) by David Cronenberg (8%, 12 Votes)
  • Creepshow (1982) by George Romero (5%, 7 Votes)
  • Pet Cemetary (1989) by Mary Lambert (5%, 7 Votes)
  • The Mist (2007) by Frank Darabont (4%, 6 Votes)
  • Firestarter (1984) by Mark L. Lester (3%, 4 Votes)
  • The Running Man (1987) by Paul Michael Glaser (3%, 4 Votes)
  • Cujo (1983) by Lewis Teague (2%, 3 Votes)
  • Christine (1983) by John Carpenter (2%, 3 Votes)
  • Children of the Corn (1984) Fritz Kiersch (2%, 3 Votes)
  • Cat's Eye (1985) by Lewis Teague (1%, 2 Votes)
  • Dreamcatcher (2003) by Lawrence Kasdan (1%, 2 Votes)
  • Maximum Overdrive (1986) by Stephen King (1%, 2 Votes)
  • The Lawnmower Man (1992) by Brett Leonard (I imagine Stephen King would suggest this should not be on the list) (1%, 2 Votes)
  • Dolores Claibourne (1995) by Taylor Hackford (1%, 2 Votes)
  • The Dark Half (1993) by George Romero (1%, 2 Votes)
  • Apt Pupil (1998) by Bryan Singer (1%, 1 Votes)
  • Thinner (1996) by Tom Holland (1%, 1 Votes)
  • Needful Things (1993) by Fraser Clarke Heston (1%, 1 Votes)
  • Silver Bullet (1985) by Daniel Attias (1%, 1 Votes)
  • Sleepwalkers (1992) by Mick Garris (1%, 1 Votes)
  • The Mangler (1995) by Tobe Hooper (0%, 0 Votes)
  • Sometime's They Come Back (1991) by Tom McLoughlin (0%, 0 Votes)
  • Creepshow 2 (1987) by Michael Gornick (0%, 0 Votes)
  • Graveyard Shift (1990) by Ralph S. Singleton (0%, 0 Votes)

Total Voters: 150

Loading ... Loading ...