WordPress MU Domain Mapping 0.1

A long sought after feature in WordPress MU is domain mapping. That’s where a blog on a WordPress MU site can be “mapped” to a new domain. WordPress.com has an advanced domain mapping feature that has proved to be very popular with users even though it’s a paid-for upgrade.

This domain mapping plugin isn’t quite as powerful and still requires plenty of testing. So, while domains and “sub domains” or hostnames can be mapped to individual blogs, there are a number of caveats:

Remote login does not work. It’s possible to be logged in on the main site, logged in on the domain mapped blog as a different user or not logged in at all there!

I should have a Sitewide Tags update later this week, with thanks to Thomas Schneider who came on board last week to help and has done some super work!

Ron and Andrea found a bug in pre release testing that I forgot to fix in 0.1, so grab 0.2 if you were (un)lucky enough to grab the first release! Thanks Trent for testing too. Follow me on Twitter to get the inside scoop on my WordPress plugins, including a sort of super secret Twitter plugin..

WordPress MU is the multi blog version of WordPress that runs on WordPress.com and many other sites.

82 Replies to “WordPress MU Domain Mapping 0.1”

I happened to look at how the votes were going just before they hid that info and it was pretty clear that CommentLuv was running away with it but, clearly, with their special mention, the judges recognized the importance of the (somewhat niche) problem you’re tackling with this plugin.

As it happens, I’ll be getting into gear and having a shot at getting Domain Mapping working tonight, following the Cpanel-specific instructions at WPMU Ed and BavaTuesdays – I’ll post back here to let other CPanel users know what worked best for me.

Donncha, This is an issue that has already been reported, but no solution found. On any domain mapped sites, when you try to upload an image via the media uploader, it looks like it uploads fine. When you try to insert the image into the editor, it gives all sorts of errors depending on what browser you are using. On FF, it’s just a blank media uploader and nothing is placed in the editor. On IE, you get an Error 2060 permissions error about not being able to access the javascript uploader. On Safari and IE, you also get the login page for the site in the media uploader window asking you to login. Any help would be great! Thanks!

A suggestion for future releases: the plugin should update the blog address setting so it doesn’t require manual intervention. It should also revert back the setting if the user deletes the mapped domain. But then what happens with their image links ? Those will be broken as images uploaded with the mapped domain will have the url of that domain ..not the subdomain. This is still the first release, so I’m sure we’ll get fixed up good.

While that solution does work (not quite for me though), it is not what Donncha has intended with the domain mapping. If you read this comment by Jim of Bavatuesdays and see Donncha’s response in the next comment: “The domain mapping is for blogs only, not sites. The domain mapping hack always annoyed me because it mixed the two concepts up so much.”

Like me put up a hypothetical of why Donncha’s method works better, IMO. Let’s say you have hello.world.com and you domain helloworld.com to hello.world.com. When people visit helloworld.com or hello.world.com, it should resolve back to just helloworld.com. Perfect. But what if you want goodbyeworld.com instead of helloworld.com. Sure you can change the 4 entries to goodbyeworld.com, but then helloworld.com won’t resolve anymore. Yes, you can also put a domain forward on the helloworld.com to resolve to goodbyeworld.com or even do a .httaccess redirect, but in both cases, it is not elegant and adds to load times. What if you simply wanted to stop using domain mapping? You would have to go back in an re-edit the four links to reflect the old hello.world.com. Donncha’s plugin makes life easy by accomplishing two things:

1) Map a (or many) domain names to a blog.
2) Make it easy to manage the blog’s mapped domain name(s).

Keep this in mind, the more redirects you do, the slower the site will run and when you need to unmap a few domains…it becomes a nightmare to manage. I know because I’ve been using this method for a long time.

Hi, I’m having problems creating a category in the write post using myblog.com/wp-admin/post-new.php but when I unmap the blog and use myblog.mywpmu.com/wp-admin/post-new.php I can create categories. Any one having that problem?

Donncha, the plugin looks extremely helpful. However, I’m having doubts about the initial WPMU install: Iâ€™d like to keep the code in a subfolder in order to keep things tidy, so WPMU would be in mydomain.com/wpmu, not in the root folder.

Then Iâ€™d like to have blogs named blog1.mydomain.com, blog2.mydomain.com and so on.

Whatâ€™s the best way to set this up when installing WPMU? Should I choose mydomain.com/blogs or blogs.mydomain.com (or even mydomain.com) as the main site address?

I guess the latter option will then require long URLs such as blog1.blogs.mydomain.com and blog2.blogs.mydomain.com, while the former would then require URLs such as blog1.mydomain.com/blogs and blog2.mydomain.com/blogs. Both of them are obviously too complicated.

The plugin documentation and assorted blog postings does not seem to answer my doubts.

I think I am missing something completely. Is there a clear description of exactly what this plugin is supposed to do? I know what my needs are, and the overview seems to suggest that this plugin will do it, but that is as far as I get.

For example: is a user supposed to be able to see a blog under its own unique domain, or is this just a redirect tool? Where do I actually link a domain to a specific blog? There are lots of questions around by people using this plugin saying that links do not go where they expect them to, but I cannot find any documentation that describes what is actually supposed to happen, and what links to what.

Sorry if that is very confused, but I’ve not managed to get this plugin to do anything consistent. If I knew how it was supposed to work, I could report on specific things that may or may not be working.

I think I have figured out what I am missing. The domains cannot be managed from the main admin domain. There is a kind of chicken-and-egg situation here: the blogs for the alternate domains need to be created using sub-domains of the main admin domain first. Then you must log into those blogs (using the sub-domain for access). From there new domains are added (actually, just one domain, as multiple domains do not work out-of-the-box, but watch this space). From that point the sub-domain suddenly stops working and all links change to the alternate domain for that blog. Since the domain changes, you also need to log back in, as the browser needs new cookies.

If that process goes wrong, then there is no way to fix it from the main admin domain, and there really ought to be. Luckily the database table of domains is not too complex.

Like I say, watch this space, as I have a few patches to fix some of these issues.

Hi – I am having issues with the links not working after I configure the domain mapping for WordPress MU.

Here’s what my config is:
1) I installed WordPress MU at the blogs.domain.com subdomain of my site. It’s working fine.
2) I installed the domain mapping tool. No problem there.
3) I want to create a new blog called “test”. This creates test.blogs.domain.com. No problem there. I tested all my links (About, test posts, test categories etc.) and they all work fine.
4) I now want test.domain.com to resolve to test.blogs.domain.com
5) I set up a domain map in the test.blogs.domain.com dashboard. I add test.domain.com as the domain to map to this particular blog.
6) I create a CNAME map in my DNS as follows:
test.domain.com 300 IN CNAME domain.com
7) It seems to work…when I type test.domain.com in a browser, I get the blog at test.blogs.domain.com. However, when I click on any link, like “comment”, or “About”, the links are broken (not found).

Question:
How do I fix this? Is there something that I need to add to my Apache config file (a VirtualHost directive?), or to the .htaccess (a redirect?)?

Domain mapping doesn’t appear to work on a virtual host, but the docs say it supports vhost. How do you suggest we set this up, because the domain is resolving to the IP, not the vhost, right now. Is there a trick to this? We have full root access if modifications are necessary in the apache config, maybe a wildcard somewhere?

Hello, I am currently using the Domain Mapping plugin. Its great !! I have domains mapped with both my site IP and CNAMEs. After the domain is mapped, I can completely remove the blog’s created sub domain and doing this helps links on BuddyPress activity to work correctly with a mapped domain. I just change the base, home, and files URLs in the blog’s Options database table. Good to go.

Any ideas how to completely bypass the sub domain registration and create the blog domain mapped ?

The Golden Compass
First of a three part fantasy/sci-fi series. Some people hate it because of it's anti God message but it's a great read. I found it hard to put down. There's even a Snopes article about the film adaptation.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.