For the last 24 hours I have been working with Donncha’s Domain Mapper plugin with my Multisite.  Granted, this hasn’t been officially made for WP 3.0 Multisite as yet, but the process is pretty much the same.

To explain what domain mapping is:   Unlike a standard WordPress site, the WordPress MU or WordPress 3.0 Multisite is the ability to have multiple instance of blogs via a single installation of WordPress.  All of your blogs / user logins & information are retained and managed under a single installation.  The benefits of this include everything from less processor/memory usage (if you have multiple blogs on a single hosting) to having everything integrated between all of your sites to share data.

When a blog on WPMU or Multisite is created you can either set it up as a subdomain, like boxed.frumph.net, or as a  subdirectory structure like frumph.net/boxed.  The most appropriate way is the subdomain model, but for those that do not have the DNS wildcard capability through their hosting they can still opt for the subdirectory method.

What Domain Mapping does is ‘remap’ those subdirectory or subdomain URLs to domains that you own.  For example, webcomicawards.com remaps to webcomicawards.frumph.net, so that when someone goes to webcomicawards.com they are literally going literally to the actual site that is managed by the WPMU or Multisite.

Backstory

My MultSite, and others that I have set up (including shivae.net), have had TONS of issues with massive redirects and SQL calls ‘per page load’ that can overwhelm the database and cause data to be lost on forms being sent through the redirects.  Searching the code I have discovered several interesting things.

Techie Stuff

When removing the domain_mapper.php from the mu-plugins folder, setting the mapped domain with the proper blog ID in the domain_mapping table and setting the wpurl, siteurl and fileupload_url to the new mapped domain, I did *not* need the domain_mapper.php at all.  Although I still used the sunshine.php file for it to properly map, the rest was *not needed*.

Removing all of the redirects and extra filters from that particular plugin being used fixed any issues that were occurring with the overloading of the server through redirects and SQL calls.

So I spent the morning basically fiddling with it as you can read here:  http://wordpress.org/support/topic/389581.

That’s when I started talking to others in the community and was directed to this plug-in:  http://wpmututorials.com/simple-multi-site-plugin-e-book/ which, if you read the support topic I posted about above, you will notice how I determined that Donncha’s plugin was…..well, I don’t know, not exactly what I had in mind for what the plugin should actually do.  However, the one from WPMU Tutorials is more or less exactly how I envisioned a domain mapper should behave.

Pros and Cons of both

Donncha’s Domain Mapping plugin

Pros:

  • Made by Donncha, @donncha on twitter.  Widely accepted as a leader in the WP community and programming expert.
  • Excellent interface and user understanding on how an end user should utilize the plugin.
  • Allows blog creators to map their own domains.
  • It’s free.

Cons:

  • It’s bulky, uses redirects to do the mapping and the extra SQL calls to achieve that (I do not know for what purpose it serves to do it that way).
  • Version 0.5.1 erm…..has some backdoors or what *appear* to be backdoors with the $_GET and $_SERVER calls being used before being prepared/escaped.
  • Getting an “Unknown Login Key” error which makes it not usable with Multisite.

WPMU Tutorials Domain Mapper

Pros:

  • It maps the domain without needing redirects and extra SQL calls.
  • Made by Ron Rennick(sp?) aka @wpmuguru on Twitter.    The guy is ALWAYS helpful, and I mean ALWAYS there to help with ideas on proper coding – pure genius.

Cons:

  • Interface needs serious work.
  • Does not allow users to map their own domains, the administration of this plugin is only on the main site’s backend.
  • The add/edit/remove administration could be a bit easier to understand.
  • It costs $$ to buy.

Conclusion

I would use, and am using, the domain mapping plugin now from WPMU Tutorials, the cost of the plugin outweighs the necessity of having the domain not have the excessive redirects and SQL calls.  I do hope, however, that they make it prettier and send out updates to all of the people who have purchased it.

- Phil