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 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 *
    DocumentRoot /home/umwblogs/public_html
    ServerAlias *
    User umwblogs
    Group umwblogs
    BytesLog /usr/local/apache/domlogs/
    CustomLog /usr/local/apache/domlogs/ 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 would have the correlating blog on the existing WPMu install: 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 not 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 on bavatuesdays

This entry was posted in , multiple domains, Plugin, plugins, tutorial, Wordpress, wordpress multi-user, WP, wpmu. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *