Using multiple Domains with WordPress MU
By default in WordPress MU, blogs can be username.yourdomain.com or yourdomain.com/username/. But what if you want select blogs to have their own domain? It’s actually easier than you think.
Overview:
- install a domain mapping plugin
- park a domain
- map a blog to a domain
First, get the WordPress MU Domain Mapping plugin. NOTE: this domain mapping plugin only works with subdomain installs.
You can download it from inside Wordpress MU using the plugin installer, but it will have to be moved from the plugins folder. In WPMU, there is another plugin folder called mu-plugins. This is for mu-specific plugins that will be run all the time. Plugin in this folder do not need to be activated and they will not show up in the Plugins list in the admin area.
Place the domain-mapping.php file in the mu-plugins folder.
There’s another file included called sunrise.php. Place this in the wp-content folder.
The file gets run before most of WPMU and handles the domain requests. In order for it to be recognized, we now have to edit the wp-config.php file.
In your Cpanel, go to the File Manager, and find wp-config.php in the public_html folder. Click on the filename, and then click on the Edit File option on the right hand side.
Most of the way down the file, under the language options, will be a line that is commented out, meaning it won’t run.
//define( ‘SUNRISE’, ‘on’ );
The two slashes (//) at the beginning of the line are what we need to remove.
define( ‘SUNRISE’, ‘on’ );
Save your changes. If you get an error, it will be because this file is created by the server on install, so you may not have permissions. Just ask support to make this change for you.
Before we map our domain to a blog, let’s set up our second domain so it knows where to go.
Login to your domain registrar, and change domain2.com’s nameservers to the same nameservers as your WPMU account. It will be something like ns102.wpwebhost.com & ns103.wpwebhost.com.
Now login to your control panel for your WPMU web account. In the main cPanel menu, scroll down to the Domains box. Click the “park a domain” icon.

In the box, type in domain2.com, where domain2 is the domain you want to map. It should come back with a success. If not, you may have to wait a few minutes for the nameserver change to catch up.
Finally, we are almost at the best part. Login to the backend of the blog that you want to change the domain of.
(Using Donncha’s plugin, if you map a domain from the admin area of the main blog, you will accidentally change the main blog’s domain. This menu option is also available to the admin of the blog, not just Site Admins.)
Look under the Tools menu for the Domain Mapping sub-menu. It’s pretty straightforward.

First, fill in the IP address of your site. You, as a site admin, will only have to do this once. We don’t have to worry about the rest of the instructions, because when we parked our domain on top of our WPMU install, that took care of it.
Fill in the domain name (domain2.com) and save. The screen will refresh and show the domain name as active on this blog.
Since we are still on the subdomain, visit domain2.com to confirm that everything is working as it should. Now any attempts to visit the original subdomain will be redirected to domain2.com. You can continue these steps for each domain you would like mapped to a corresponding sub-blog.
Never miss a thing again. Subscribe to us via Email or RSS Feed now. We tweet too!
- How To Make Your WordPress Blog A Multi Author Blog With Revenue Sharing Program
- Some Simple Blogging Tips You Should Not Ignore While Building a Professional Blog
- Pros and Cons of Magazine-style Theme





September 10th, 2009 at 8:07 pm
When you say: “First, get the WordPress MU Domain Mapping plugin. NOTE: this domain mapping plugin only works with subdomain installs.”
I pressume that means this will not work with http://wordpress.caryacademy.org/subsite.
It only works with http://subsite.caryacademy.org/, right?
Thanks, as always.
September 17th, 2009 at 8:10 pm
I have a headache just reading this
October 7th, 2009 at 12:55 am
How to find a cheap webdesigner anywhere in USA…
November 5th, 2009 at 7:31 am
Really nice article, i read entries blog afternoon then add it to my bookmarks and wait for your next article, i plan follow as you.
Thanks so much
decha kunla
December 7th, 2009 at 11:20 am
Nice work,man…have submit to my Linkin account. More of my friends will see this post…great…They will interested it…Thanks.
February 1st, 2010 at 6:14 am
i’ve got this installed and wp mu now reacts to domain2.com, however if i want to access the dashboard, it simply redirects to domain2.com/wp-login.php. I’ve also got BP installed and can see that this blog’s user is perfectly logged in, I just can’t access the dashboard – any suggestions?
February 4th, 2010 at 4:50 am
finally got it working by completelye starting from the ground up again…