Donncha’s new Domain Mapping plugin for WordPress MU is a wonderful plugin that WPMU users have long salivated for since WordPress.com introduced the feature almost a year ago. Donncha, for those who don’t know, is Automattic’s primary (translation: only) WPMU developer and is amazing at rolling features from the WordPress standalone and WordPress.com into the WPMU code base.
So how good is this new plugin? It’s damn good. It simplifies a process that used to take no less than 30+ steps to accomplish! The plugin does not render the XML-RPC useless unlike the old hack did! It was definitely not plug-n-play, or even pretty for that matter. So here’s a step-by-step setup for those who don’t quite know how to use the new plugin.
How Do I Install The Domain Mapping Plugin?
- Login into the domain name’s control panel (this is different than your website’s cpanel) and change the DNS to reflect your name servers of our server. In my case, it would be
Please note that if this is an existing domain, it may take 24-72 hours for the DNS to propagate. If it’s a new domain name that you just purchased, it will happen very quickly.
- Download the Domain Mapping plugin from the WordPress Plugins Directory.
- Unzip the file and upload the sunrise.php file to the /wp-content/ folder. Copy domain_mapping.php into the /wp-content/mu-plugins/ folder.
- Open your wp-config.php file and look for
// uncomment this to enable wp-content/sunrise.php support ;define( 'SUNRISE', 'on' );
and remove the “;” at the very beginning of define to uncomment the code. If you do not see the line of code in your wp-config.php, it’s OK, just write it in right under
and save it.
- Please note, you have to have Site Admin privileges to use this plugin. Now in most cases, it makes no sense to domain map a domain.tld blog (your main blog) unless you want to change the domain name. The beauty of this plugin is that if you domain map a domain.tld blog, it will redirect traffic automatically with the new mapped domain name in the URL. To domain map an already created (or a domain.tld blog), go to your Dashboard of the blog that you want to domain map (don’t visit the domain.tld when you are intending to map subdomain.domain.tld), select Tools, and select Domain Mapping.
- Where it says Server IP Address, you want to enter your the IP address of your server. You can find this out by opening a command prompt (Windows) or a terminal (Mac & Linux) and typing
That will produce the IP address. Enter that IP address and click Save. Under Add new domain, put in the domain name that you wish to be mapped to this blog. Click Add. (If you read the notes underneath the Add new domain, you’ll see that you can do what CNN does with their blogs like the Political Ticker. By using CNAME, WordPress.com is able to host http://politicalticker.blogs.cnn.com/ and CNN would host CNN.com. If you want to do something like that, login in to your domain name that you want to create a virtual subdomain (physical subdomains would be created in your CPANEL which would result in a physical directory on your server whereas a virtual subdomain is merely an aliases) at GoDaddy, Yahoo, or wherever your domain name registar is. I use GoDaddy, so your steps may vary, but I go to my Domain Manager, selct the domain name I wish to add a CNAME to (let’s say in this case, BuiPhotography.com) and click on it to edit. Inside in the middle upper column, under Total DNS, I click Total DNS Control and MX Records. Under CNAMES (Aliases), I click Add New CNAME Record. Under Enter Alias Name, I put blog in the field because that’s the new virtual subdomain I wish to create. Under Points To Host Name:, I put in the server IP address of my server that hosts the WPMU installation where my blog resides. Leave TTL to an hour. It may take anywhere from 5 minutes to 3 days to resolve before you can use the newly created virtual subdomain. Once it does resolve, you need to login into your CPANEL and park the subdomain (blog.buiphotography.com). Once parked, now login into your blog you wish to domain map (http://buiphotography.bui4ever.com) and go to Tools > Domain Mapping and enter in blog.buiphotography.com and it should start working! Cool huh?
- After you save, you will notice that the new URL is resolving with the new domain mapping meaning that subdomain.domain.tld should now resolve as domain.tld and if you try to visit subdomain.domain.tld, it should automatically rewrite it as domain.tld.
- If you wish to undo the process, log back into the Dashboard > Manage > Domain Mapping and delete the entry.
[UPDATE: So one of the major things I noticed is that with the Domain Mapping plugin, you can no longer create subdomain blogs of mapped domains. With Dr. Mike’s domain mapping method, a newly mapped domain had the ability to create subdomain.domain.tld just like the main site. For some people, this could be a drawback and for others, it doesn’t matter, but it’s worth noting.]