Well, I hate to quote our fearless leader out of turn, but unlike him I really was successful!
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:
- 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 [email protected]
ServerAlias wpmued.org www.wpmued.org
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!
- 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:
- “Site Name” (what to call your site)
- the “Domain” field will have the URL of the domain you have parked and pointed to the existing WPMu installation
- The “path” field where you need to enter a single forward slash “/” (no quotes)
After this, map your new domain.
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).
- 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.