
I recently wrote an article about how to use WordPress 3.0 multisite/network features. This feature is really cool but out of the box it only supports the multiple sites/blogs to be served on the same domain (networksite1.domain.com or www.domain.com/multisite1/). For some this may be fine but really most like you want to have unique domains for each individual site. In this article I provide a quick guide on how to set up multisite domain mapping in WordPress 3.0. Please note that you should not follow this tutorial if your WordPress 3.0 has not been configured to support multisites!
Advertisement
Before you do any mapping, you need to work with your host to make sure that the domains in question all point to the primary domain. In other words, let say your primary domain is [a].com and you want to map [b].com to the WordPress served on [a].com. Before you start this guide it is a pre-requisite that you have set up the DNS-records for [b].com. There is a short guide at the end of this article if you need assistance on DNS-configuration but you can also consult your hosting provider as needed. After all the DNS-configuration needed for this to work is quite basic if you know how DNS work.
The plugin is what later separates them out into the separate sites, but to do that, the domain needs to send you to the WP site in the first place. For this tutorial, we will be using the WordPress MU Domain Mapping plugin. This plugin allows users of a WordPress MU site or WordPress 3.0 network to map their blog/site to another domain.
Guide for setting up Domain Mapping
Step 1: Manual Plugin Installation
The Domain Mapping plugin is unlike most other plugins as you are not going to install it the traditional way using Plugins->Add New menu. It is a bit more complicated and you need to update configuration files manually and FTP access to update the files on your server.
Start now with downloading the plugin here. The plugin consist of two files that you need to put in the proper places. In WordPress 3.0 the wp-content/mu-plugins folder doesn’t exist – you need to create it. The first file to be uploaded is the domain_mapping.php file. This needs to go into the mu-plugins folder you just created.

The second file is the sunrise.php file and you need to upload it to the wp-content folder.

Step 2: Activate Sunrise
You need to edit your wp-config.php file placed in the WordPress root folder. In wp-config.php uncomment the SUNRISE definition line: define( ‘SUNRISE’, ‘on’ ); If this line does not exist, paste it in. (if you face any trouble at this stage check to make sure your apostrophes ( ‘ ‘ ) in the pasted code are the same type as the apostrophes in the rest of your wp-config.php file. If not you need to manually chance them in the pasted code.
This will cause WordPress to go load that sunrise.php file and use it, however if you have not installed the network features of WordPress this is where things will go wrong!
Step 3: Server info
Domain Mapping has now been installed and next you have to set up the basic configuration. Go to your main domain’s admin page and log in as an administrator. Then go to the new Super Admin->Domain Mapping menu.

There are two main options to choose from here. You can either put in the IP address of your server (as defined in your domain’s main A record) or you can put in a CNAME that points to your server. The IP address is what I would recommend you to use. If you are not sure about your IP-address you simply have to ping your domain. On Windows open a command window and write “ping <domain name>”. The instructions on the page are pretty good read them carefully.
Other options on this page:
- Remote Login – This will make your login pages for all sites redirect to your main site to do the actual login. The benefit of this is that when you log in to one, you log into all of them. The downside is that the URL changes to another domain in order to log in.
- Permanent redirect (better for your blogger’s pagerank) – This makes your subdomain or subdirectory sites redirect to their domains. You should leave this on.
- User domain mapping page – Turn this on if you want users to be able to put in their own domains for mapping.
- Redirect administration pages to blog’s original domain (remote login disabled if redirect disabled) – This makes all admin pages show up on the original domain instead of on the new domains. You need this enabled for remote login to work.
Step 4: Mapping the Domain
Before you can actually take a new domain into use on a multisite you need to do some configuration up front. When you purchase a new domain, you will need to update its DNS settings to actually point to the WordPress server IP or CNAME. On some hosting plans this is easy and there are good instructions on how to set it up. On others you may need to ask support to get assistance. I use a pure DNS hosting provider (separate to my web hosting) where I have full control of the DNS settings and setting up a new A Record is pretty simple. I have also tried it on smaller hosting solutions using their own home made software and here I found this kind of task really though. You may need to be patient because some domain updates takes quite some time to replicate to the many DNS servers on the Internet. This is controlled by TTL on the record and you my want to lover it to 10 min. when you are playing with the domain settings. There is a guide below on how to do this if you have cpanel.
There’s two ways you can actually map a domain to one of your sites. The user screen is the simplest way, if you left that option on before. Log into the site you actually want to map to a new domain. Easiest way to do this is clicking Super Admin->site->Backend.

Then go to Tools->Domain Mapping. What you need to do is to put in the domain name, set it as the primary and press add.

You need to be aware that if you didn’t get the domain (in the example testsite.com) pointed correctly to your WordPress server before doing this, then your site will not be accessible. So make sure that your domain is ready before doing this. If you in step 3 selected the fourth checkbox about redirecting admin pages to the main domain you will still be able to access the admin area for the site.
The other way to set domain mapping is through the Super Admin->Domains menu. Here you’ll find a list of sites and their ID numbers and you can map an id number to a domain name here.

The Tools approach found under the multisite is a simpler to use, but the super user version will allow you to map domains without visiting each site. You can also correct broken domain mappings from here.
Step 5: Seeing the Mapped Domains
After setting up the domain for a network site you will see that the domain mapping (column at the right) is shown in the sites listing. Go to Super Admin->Sites.

When you get this result your network site has been configured with a domain and is ready to use!
DNS Guide For Cpanel users
If your domain uses the name servers on your hosting account you should follow these instructions. If the nameservers are elsewhere change the A record or CNAME as documented above. Add a wildcard subdomain/virtual host record to your site’s DNS record in Web Host Manager (WHM). If you do not have access to WHM, you must email your web host and ask them to make this one change for you. Should be no problem:
- Go to “Edit DNS Zone” and select the domain of your WPMU installation and click “Edit”.
- Below “Add New Entries Below This Line”, enter in the first box (Domain) an asterisk: “*”.
- The second box, TTL, should be “14400″.
- The third box should be “IN”.
- Select A Record Type from the drop down “A”.
- And in the last box, paste in the IP address of your website/network.
From Cpanel, click on the “Parked Domains” under the “Domains” section:
- Under “Create a New Parked Domain” enter the domain name you want to add to your network.
- Click the “Add Domain” button.
- It should add the domain to the list of parked domains and under “Redirect to” it will say “not redirected”. That is OKAY.
Resources:
- WordPress 3.0 Multi site Domain Mapping and Sub-domains: http://wordpress.org/support/topic/30-multisite-domain-mapping-and-subdomains
- Everything about Domain Mapping: http://premium.wpmudev.org/project/domain-mapping
- WordPress 3.0 Multisite and Domain Mapping http://frumph.net/blog/articles/wordpress-3-0-multisite-and-domain-mapping/
If you want to see more e.g. great website themes, these Restaurant Menu Templates might be what you’re looking for. Also take your time to browse these interesting HTC evo cases that will protect and personalize your cell phone.



{ 116 comments… read them below or add one }
Next Comments →
Thank you for this entry. I was new to the whole Wordpress 3.0 and multiple domains came up in one of our meetings. This will help out a lot.
What meeting? Hi,
Nelson here;
Newbie here also, what meeting? is there a place where I can go to meetings about this? I could sure use some help. I’m doing this mapping thing strickly because I’m told to do it, i really don’t understand why? I only have one domain name?
I followed all the directions to a T and keep getting this when I log into the superadmin, domain mapping section,
Please uncomment the line define( ‘SUNRISE’, ‘on’ ); or add it to your /home/mimdocst/public_html/wp-config.php
I have redone the wp-config.php several times, checked rechecked and installed and uninstalled
Cannot figure out why it wont work
Help
I tested the process myself and it worked well for me. You may not have activated SUNRISE. Please try to change
this: //define( ‘SUNRISE’, ‘on’ );
to this: define( ‘SUNRISE’, ‘on’ );
jeanne michael, I had a problem when I copied and pasted the code – check to make sure your apostrophes ( ‘ ‘ ) in the pasted code are the same as the apostrophes in the rest of your wp-config.php file. Mine were different and once I deleted them and typed them back in, everything worked. In other words TYPE in define( ‘SUNRISE’, ‘on’ ); into your wp-config.php….don’t copy and paste it. See if that helps.
Mike, thanks for the input. I have updated the tutorial to make sure others will not face the same problem as you did.
I did the same thing but then I noticed (as stated in the article) that my quote marks were not the same as in the rest of the wp-config.php file.
The line I copied and pasted had ` as the quote mark but everything else in my wp-config.php file had the ‘ quote mark. Tilted quote mark vs. straight up and down quote mark. This fixed the problem for me. Hope it helps.
To this point I’ve used individual domains for my blogs. What a managing nightmare. MU is the way to go. Thanks for the information.
I followed the directions up to activating the sunrise file and I get the following error:
Parse error: syntax error, unexpected T_IF, expecting T_STRING or T_VARIABLE or ‘$’ in /home/wttsite/public_html/wp-config.php on line 98
I went to look at my wp-config.php file and noticed the define( ‘SUNRISE’, ‘on’ ); I pasted in there changed to the following:
define( ‘SUNRISE’, ‘on’ );
The following is line 95-102 with the rest of the information below the sunrise line:
/* That’s all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . ‘wp-settings.php’);
Is there something I didn’t get set up right for it to change like that and give me the error I am getting?
I appreciate any help you can give me on this!
Oops, I meant to say it changed it to:
define( ‘SUNRISE’, ‘on’ );
Any ideas where I might have messed things up?
Thanks!
Just wanted to let you know that I figured it out. It is working now that I changed the sunrise line to the following:
define( ‘SUNRISE’, ‘true’ );
Hopefully this will help someone else if they run into the same problem as me.
Thanks!
Thanks for a great tutorial, it will help me a lot with my blogs, enjoyed your site and will come back again. regards Pete
if you are going to get a VPS server make sure that it has cPanel coz it makes server maintennance easier.”~
I am still getting the error message: “Please uncomment the line define( ‘SUNRISE’, ‘on’ ); or add it to your /home/decision/public_html/wp-config.php”
I tried Lori’s suggestion of changing “on” to “true” in the code, but it’s still not working.
Any suggestions?
Thanks in advance for your help
Figured it out. I think I was pasting in text using “curly quotes” instead of straight ones. Not sure if this was the problem, but replacing them fixed it.
One this helps someone else down the road.
Thanks for the tutorial. I got me past installing the plugin. I do have a question. In domain mapping with the IP address, should the IP address be permanent (not shared)?
This tutorial was build using a permanent IP on a VPS account on wiredtree. I use them for hosting tripwire and I can quite easily set up new cpanel environment for testing with its own IP. What the tutorial is trying to achieve is actually to serve multiple WordPress instances on the same IP and same WordPress installation.
If you have an IP that is shared already – like using bluehost hosting and assigning multiple domains and sub domains to it – I guess it multi domain mapping will work also. I started tripwire magazine with an account like that and I had several domains pointing at it. The tools the have for doing so is simple. Once you have a WordPress 3.0 installed – let’s say in the subfolder /public_html/wordpressmultisite/. Depending on what you want to do you then use either Parked domains or Subdomains to make it accessible in an domain. (otherwise it can be accessed at /wordpressmultisite/. I have not tested it myself but from here I expect the tutorial to work on a shared IP as well… Good luck!
Hi, thanks for the quick reply.
Adrian
P.S. By the way, What WP plug-in do you use to have the
“Notify me of followup comments via e-mail”
You are welcome Adrian.
We use http://txfx.net/code/wordpress/subscribe-to-comments/ on tripwire
Sorry, I don’t understand how to configure this so that both domainname.com & http://www.domainname.com work.
At the dns service I set up:
@ ‘ip address’ ‘A record’
www domainname.com cname
Then in domain mapping for the site in Wordpress I need to add domainname.com and http://www.domainname.com?
Um… doesn’t seem to work – domainname.com works fine http://www.domainname.com gives server not found.
I’m not sure you want to do this. For SEO reasons you need to use what is referred to as Canonical URLs. This basically means that you have to choose between use www. ot not. If you don’t you risk that search engines index on both subdomains and it will damage your ranking. You need your domain to point to wordpress in both cases but you should use either rules in apache or a plugin/theme that enforce Canonical URLs. Look here for more info on this topic: http://www.tripwiremagazine.com/2010/07/wordpress-seo-guideline.html
My tutorial covers some of this using screenshots from GoDaddy hosting as well:
http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/
Hi. I have a Primary domain with Hostgator and several AddOn domains below public_html/on which I installed Wordpress.
How can I implement the WP Multi-site feature?
The plugin seems to work well except that my posts and pages stopped showing up.
When I set a post to “sticky” on the front page, it would appear.
Also, if I have a widget that lists posts, the posts would appear there, and I could click on them and bring up the posting.
I can edit the posts and pages with no problem.
And then for the pages which appeared in the header menus, hovering over them showed what would seem to be a correct URL, but clicking on it produces “Not Found”.
I tried looking into the database and examining the wp_17_posts to see what shows up in the “guid” column and others, and the code for “have_posts”.
I have a feeling I’m overlooking a real obvious cure for this problem…
Anyway, thanks for the domain mapping plugin! One I get the last problems solved, this will be awesome!
I wonder if any had experienced this problem or possibly had an idea what the solution might be. If not, that’s OK…I’ll keep digging through the source code.
The problem is that pages give 404′s and posts don’t appear on the front page unless they’re marked sticky. I don’t know if I did something that threw off the have_posts function maybe?
Dan sorry I missed your question the other day. Have you checked if everything is working as it is supposed to without domain mapping? THe multisite configuration must be OK before you apply the domains. ex./subsite. Also in the new subsite there will be no pages and posts at all as it is like a fresh install of WP. However the main instance of WP should not be affected in any way – hope this is not the case.
Hi, Tripwire Team…that’s OK. Thanks for the followup. I know you’re busy and I just appreciate that you have this website here.
Actually, it’s interesting you ask about the multisite thing. Actually, it was a working WPMU that was upgraded to 3.0 then 3.0.1, and I wanted to consolidate sites with different domain names into one site to save memory and keep the APC cache small and fast rather than having duplicate copies of everything.
I installed the domain mapping plugin as per instructions, putting the two files mentioned where they were supposed to go, and I set up a new blog, mapped it to http://no-divorces.biz, and I went to godaddy.com and switched the IP address over to the one for http://godsblogs.com. Actually, the WPMU site I was doing this to is godsblogs.com, and this is at ndb.godsblogs.com with that domain mapped to no-divorces.biz.
So, when I browse to http://no-divorces.biz, it looks good. (I imported the file from an export from my old location using the normal WordPress export and import, and the old one was on WordPress 3.0.1 but it wasn’t set up for multi-site whereas godsblogs.com is. Or actually I have to clarify that a bit.
Godsblogs.com was originally a wordpress 2.9.2 install or before and it was a wordpress-mu install. So, when I upgraded to 3.0 and then to 3.0.1 later, it remained like an ordinary WPMU site. However, I did not know about that entry you mentioned that needed to be placed in wp-config.php for multisite. I did not see it there, but it seemed to work fine as a WPMU site regardless.
Where the problem came in was after I installed the multiple domain plugin. Things worked, but the front page showed up with no posts. I could edit the posts. I could see them listed in a widget on the side and select them and bring them and view them, but they would not appear on the front page unless they were set to sticky.
There is also one more thing I need to mention and that is I use the w3 total cache, but I don’t use it with the apc cache or memcached as I found myself getting tight on memory on my little VPS. So, what caches I use, such as the page cache, I drive to disk. I tried clearing those to see if things changed, too, and they didn’t I and I pretty much expected that.
And there is one more thing. Rather than using an .htaccess file, I put everything into separate httpd.conf files with some of the caching entries broken out into includes. However, all this seems to work fine for normal wpmu operations. It is only after doing the multi-domain thing that the “pages” got 404′s and the “posts” failed to show up on the front page unless they were marked “sticky”.
I don’t know if something I did might have thrown off the “have_posts()” function somehow and if that might have caused something to cause “pages” to throw 404′s as well.
Also, you mentioned /subsite. I have been using subdomains. I wonder if I missed something there and whether these have to be done as subdirectories rather than subdomains. The website has been working pretty well with subdomains. But, actually I think some of the front pages indeed went away on some or all of the subdomains even though they were not using a different overall domain. However, the main domain seems to work. I need to go back and look to see whether I set that front page posting to sticky or not….
Thanks again and sorry to be so long-winded.
Dan
Hi Daniel, wow that’s what I call a detailed description! To keep things simple I think it important to know if your subsites work with domain mapping turned off. Pick a subsite and go to: http://www..com//wp-admin/tools.php?page=domainmapping (found in backend of subsite under tools. Set the primary to http://www..com/ and test it. If it does not work either it may not be a domain problem related to your new domain for the subsite. It could be a problem with your upgrade to WordPress 3.0 and configuration of the multisite features? Another thing….you write that you have been playing around with .htaccess….well I would not recommend this – at least not in this case until you know exactly what is needed to make it work. Consider going back to default Wordpress configuration and see if it works. Also try deactivating plugins that may affect article rendering. Caching, redirection, permalinking…..etc.
http://www.godsblogs.com/wp-admin/tools?page=domainmapping takes me back to
http://godsblogs.com/wp-admin/?c=1
This puts me at the dashboard with the Dashboard entry under the Dashboard main area selected.
Godsblogs it the parent site where all the subdomains exist.
If I go to http://no-divorces.biz, I end up actually at http://no-divorces.biz which is actually internally http://ndb.godsblogs.com.
So, that all seems to be working.
If I go to marriage.godsblogs.com, a totally different subdomain, it works, too.
However, I noticed that I have to make postings sticky before they will appear on the front page. And this is true for both “marriage”, which is a subdomain that is not mapped to anything else, and “no-divorces.biz” which is a mapped domain.
So, both the mapped and the unmapped domains are affected.
I created a subdirectory under mu-plugins called buggy and pulled the sunrise and domain mapping php files back into it and turned off SUNRISE in the wp-config file just to see if the postings and stuff would come back. I must have bungled something else up instead. I’ll have to see what would cause “have_posts()” to return nothing maybe, or try to trace through it all to find out what would cause the “pages” not to be seen–just the sticky “posts”.
I have all my other wpmu sites working fine on the same system with includes for the httpd.conf file instead of using .htaccess, and they seem to work fine. But, it may be that I introduced something else other than the domain mapping that may have caused the problem. As for the configuration files, I basically broke them out into separate plugin files for page caching, object caching, and such for w3 total cache and included whichever ones I had selected, and they came pretty much directly from what w3 cache asks you to cut and past into the .htaccess file except that the page cache file actually contains a reference to the domain name in it, so I had to break those out individually. But, I have save-marriages.com and save-marriages.org and family-fanatics.com all on the same system with configuration files basically cut and pasted across from each other, and they all work fine. I must have screwed something up in a way unique to godsblogs.com.
But I agree. It’s tricky stuff to be playing with. The curious thing, though, is that the PHP code apparently throws out a URL in it’s webpage which looks pretty reasonable, and when you select it, the PHP code comes back with a page but with a 404 inside it saying that the page was not found. This does not happen with posts, but it does happen with pages. However, posts don’t show up on the front page at all unless they are marked sticky. So, this seems to be related to something in the php or database, and I’m sure it is a screwup that I made–nobody else but me. I probably just have to trace back through the code and see what happens bit by bit perhaps with logging turned on to debug once again. I don’t remember seeing anything unusual in the logs the last time I looked so it will probably be something I would find going through the php code and simulating what happens as a page or the frontpage is called up.
I tried this out with different themes, by the way, and the problem seems to remain. So, it has to be something I did that affects something more deeply internal than just the themes unfortunately. Yuck….It’ll be a good learning experience. Thanks so much for the ideas and help. I think I already deactivated all the plugins and stripped down it was still happening, but I’ll try that again. I may just be running on low sleep levels and not thinking well…
Thanks,
Dan
By the way–thanks for mentioning the caching–I have learned to be on the watch for that one. It’s really frustrating but comical the times I have found myself getting furious over a problem that would not go away only to realize that the problem was actually fixed long ago and was only remaining because I was looking at an old copy of what was rendered long before
I looked at permalinking. I have the redirection plugin there but I’ve done something a bit anathema for me, and that is I think I have a plugin active which I haven’t been using for anything. I should deactivate it if I haven’t.
Let me try a few things and I’ll let you know whether the problem gets fixed and how it’s fixed if so. Thanks again!!!
Hi – Thanks for the great tutorial. Related SEO Question…
If I map several domains (xx.com, yy.com) to one WP-MU instance (zz.com) like this article defines via DNS… am I creating any kind of SEO problems for the xx.com and yy.com?
Obviously, this feature is incredible for reducing maintenance on multiple WP installs. But, if there are SEO problems created (google only recognizing zz.com, for example?) in doing this it wouldn’t be worth it.
Any guidance on this would be appreciated!
I would say no SEO problems at all. Millions of pages are routed this way (just not using WP to produce the content) with no problems. If your pages are served correctly on xx.com and yy.com google will not know and care how the underlying implementation is. It is important though to use only http://www.xx.com or xx.com as having multiple subdomains pointing to the same pages may damage your SEO.
xx.com, yy.com & zz.com are all going to have the same ip address – isn’t that going to be the problem? Now, if there was a way that each could use it’s own ip… I’m sure that would be the way to go.
Hi,this has been so helpful thanks but now I’m a bit stuck so hope you’ll help please.
I’m with Hostgator with add on domains I’ve followed all your instructions and checked them but in Tools my options end at Network – I don’t have domain mapping.If I try the other way
there is no list of sites or ID numbers if I put my domain name in it just disappears nothing happens. I am trying to add a new domain and must have gone wrong somewhere.I look forward to hearing from you.Thanks.
Did you un-comment the SUNRISE part. Check out the other comments about this.
I figured out why mines working but I dont know how to get it to work. I went to look at my plugins and sunrise is under drop ins and this is what it says:
Drop-ins are advanced plugins in the /wp-content directory that replace WordPress functionality when present.
The description of sunrise is executed before multisite is loaded. It wont let me click on it or activate it or anything. How do I get it activated?
Thanks for coming back and sharing your investigations! What version of Wordpress are you running and have you tried completely reinstalling the plugin? Remember this is for Wordpress 3.0+ only.
BTW im sorry to double post but I also tryed switching ‘on’ to ‘true’ and that didnt work either.
Hello,
I followed your instructions to the “T” and I thought I got it correctly, but in trying to load my subdirectory file my “abc.com/def” site only shows a blank screen, while my mapping url “http://def.com” shows this error:
Forbidden
You don’t have permission to access / on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Why do I get this? If it is relevant, my hosting service is Webhostingpad, and my registry is dynadot.com.
Thanks for any information you can give to shed light to this.
Not sure actually. Did your sub-site work before you added the domain mapping? If abc.com/def did not work in itself you need to review the multisite configuration first. I have an article on this topic here: http://www.tripwiremagazine.com/2010/07/get-started-using-the-wordpress-3.0-multi-site-feature.html
Also if you set it all right you should not be ablt to visit abc.com/def at all because it should make a 301 redirect to http://def.com. Also try to make a tracert on http://def.com to make sure it points at your IP-address for the main Wordpress site.
Im using 3.0. I just tried to reinstall it and it still didnt work
I think the issue I posted a few days ago on the 17th is probably one nobody has seen or resolved. If I find a solution and it seems useful to others, I’ll try to come back here and post what I find.
See response below now
Hi,
I’m well interested in this multi site configuration but after following your instructions i keep getting this error:
Fatal error: Cannot redeclare dm_text_domain() (previously declared in /home/pqinoiqv/public_html/wp-content/mu-plugins/domain_mapping.php:29) in /home/pqinoiqv/public_html/wp-content/plugins/wordpress-mu-domain-mapping/domain_mapping.php on line 30
Plaese help i have no idea whats going on here
Thanks
Mark
Hi Mark. From the error it looks like you have two domain mapping plugins installed there.
One is:
wp-content/mu-plugins/domain_mapping.php
and the other is:
wp-content/plugins/wordpress-mu-domain-mapping/domain_mapping.php (think you need to delete this one)
Make sure it’s in mu-plugins, not the plugins directory.
Hi,
Thank you for your response, that has fixed the problem “BRILLIANT”
Thanks
Mark
DUDE!
I have done everything you instructed it all works perfectly EXCEPT for he part about “Tools -> Domain Mapping”. “Domain Mapping” does not exist in my “Tools” menu…only in my “Super Admin” menu. so I’m missing a step. The Second “Domain Mapping” screenshot..I CANNOT find this anywhere in my interface.
What did I do wrong?
))
Everything es works peachy though
nevermind..figured it out!!!
))
Great you fixed it! But please if you have experienced something others could run into also let us know here.
well it would be good to know that the .htaccess file is hidden on the ftp server by default…otherwise you’d be stuck — or you’d need to create your own.
also, how do I activate the plugins after I put them in the mu-plugins folder?? I’ve uploaded them to the server but they’re not showing on my dashboard…kinda stuck here.
Thanks for the quick response!!! You guys are great!!
okay guys…nevermind again regarding the plugins. I uplaoded the plugins in their self-named(parent) folders instead of taking them OUT of their parent folders and uploading only the .php files….so they should have all been placed DIRECTLY into the wp-content/mu-plugins folder…NOT…wp-content/mu-plugins/stats/stat.php
I have a VPS and have a WP domain on it. I want to use it as the master MU install. My VPS has static IPs for the nameserver. My MU has a static IP for SEO. Do I use the MU IP or one of the VPS server IPs when setting this all up? Can the individual blogs beneath the MU master have static IPs too?
And how do I add new domains to my server? Through WHM or within the domain hosting MU?
I think we may be trying to do the same thing.
There are several pieces to this puzzle.
First, there is the setup of your DNS.
I’m lazy. Initially, I set up a DNS server on my VPS but then after getting into the middle of yet another thing to debug, I thought about just using TotalDNS on Godaddy to do the work for me. It would take the DNS load (which isn’t much) off my VPS and put it closer to the center of the universe where others can get to it more quickly, where things are more likely to get dispersed to other DNS servers faster.
I set up an “A” entry for the domain name itsself, another one for * and another for some specific name called “server”, and then I created CNAMES for www, smtp, ftp, pop, imap and so on. That’s what I did for the main domain. Then for the other domains, I just did the same thing. I then edited /etc/hosts and put the domains in there plus a few development or testing domains I wanted to have only there and on my laptop. That gave me the ability to develop and test on my laptop first, then copy to the development area on the web server before copying it across into the main sites.
Then what? I edited /etc/httpd/conf/httpd.conf to add a vhost for the main site and for the other sites as well.
If I show you a doctored version of my vhost entries, you’ll see some things that look normal at the top, but then I sort of took a wayward path that would probably be good to avoid unless you’re comfortable with .htaccess and httpd.conf files as it is a really easy way to screw things up and give yourself some king sized headaches to the point where you may end up wanting to scrap the whole idea and go back to the normal .htaccess files. However, if you’re comfortable editing these files, you can gain some performance boosts and keep several websites’ configurations together where they can be cloned and modified quickly if you have multiple WPMU sites as I do.
I broke my vhosts into separate files and “Included” them at the bottom of my httpd.conf file. I created one of these for each of my sites, and the one for my
master site and my other sites were actually identical except for the domain name.
I included an example of a redirection for another site, and you can wipe it out if it causes confusion as it has nothing to do with this plugin or multiple domains or anything like it. For W3 Total Cache, I just copy their stuff into the files you see in the Includes.
From there, I end up with a working WPMU site. And then I installed the Domain Mapping into that site and mapped my new domain name to the second VirtualHost mentioned above as the primary domain.
Everything works for me except for the problem I mentioned with the pages getting 404′s and the posts not showing up on the front page. But, I think I screwed up something internally.
————————————
ServerAdmin dan@nodivorces.com
DocumentRoot /var/www/html/smc
ServerName save-marriages.com
ServerAlias *.save-marriages.com
ErrorLog logs/www.save-marriages.com-error_log
CustomLog logs/www.save-marriages.com-access_log common
LogLevel warn
RewriteLog logs/www.save-marriages.com-rewrite.log
RewriteLogLevel 0
Include plugin/wpmu.conf
# Stuff for W3 Total Cache
Include plugin/w3tc_browser_cache.conf
Include plugin/w3tc_page_cache_smc.conf
Include plugin/w3tc_minify.conf
# Stuff for Super Cache
#
# Include wp_super_cache.conf
#
# Zip the cache directory entries on the fly
Include plugin/zip_dir.conf
—————————————————–
(By the way, this file is doctored and is related to my own stuff, so there’s no security problem with me putting this stuff here in the open
The includes you see are mostly for things unique to WordPress or to
the various types of caches, in this case W3Total Cache. But, I was able to test out one installation and then just clone this for more installations of WPMU. If you keep this stuff out of htaccess, you may get a bit of a performance boost, but you’ll get some red warnings in the dashboard. It may be something you may want to avoid doin
So, now I have sites that work really well with the subdomains and all, and things run pretty fast for a tiny, tiny VPS. But, the APC cache is getting full and I don’t have more memory to feed it, so I would really like to consolidate sites.
Thanks for the reply. Aall domains have the same IP, yes? I’d like to know if I can have multiple IPs.
Hi,
How do i make the global plugins folder work?
Ok.. i have the mu-plugins folder on the server of my primary wp installation, and have put my plugins into it but these plugins are not accessable on my other wp installations, the other wp instaltions are mapped to my primary domain wich is what i think i’m supposed to do, can anyone help.
Thanks
Mark
I can’t for the life of me get this (domain mapping) to appear on my super admin. screen. After following directions to a T, I get this on my main page:
Warning: include_once(/home/denisef/public_html/wp-content/sunrise.php) [function.include-once]: failed to open stream: No such file or directory in /home/denisef/public_html/wp-includes/ms-settings.php on line 22
Warning: include_once() [function.include]: Failed opening ‘/home/denisef/public_html/wp-content/sunrise.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/denisef/public_html/wp-includes/ms-settings.php on line 22
Do I need to change something in my ms-settings to allow it to include sunrise?
Heads up: Speak veerrry slowwwly to me, as I’m a newb.
Thanks. Denise
Hi Denise, I really want to help you out.
It looks like you have sunrise uncommented as it should be, but the file is not on your system. Did you upload it to the folder as illustrated?
Failed opening ‘/home/denisef/public_html/wp-content/sunrise.php’
Please also confirm that you did follow this guide to a T before setting up domain mappings.
http://www.tripwiremagazine.com/2010/07/get-started-using-the-wordpress-3.0-multi-site-feature.html
Hi Everyone, I have just a quick question. I just started with this multiple blog thing so right now I only have one domain (main site). Should I do this Multisite Domain mapping when I create the other blogs/domains (network)? Or should I go ahead and install it and get it ready to go?
Thanks a bunch this tutorial looks easy enough
Tam
I went ahead and started this so that I can put the plugins where they need to be
But I am still stuck on my question below.
Thanks,
Tam
Okay this may be a really dumb question but I’m stuck at: Step 4: Mapping the Domain
I’m stuck because I have one blog domain (main domain) and that’s it.
http://www.my1stmultisiteblog.com
And I installed the multisite network in the root directory of my main blog because then after that I will have directory folders as such:
http://www.my1stmultisiteblog.com
http://www.my1stmultisiteblog.com/my2ndmultisiteblog.com
http://www.my1stmultisiteblog.com/my3rdmultisiteblog.com
But until I have other domains do I still have to do the mapping part? I’m confused. Nothing really to map as it’s already pointing to it’s self.
Let me know if I’ve confused my self even more and if I do in fact need to map my 1 domain or wait until I have a 2nd to do these steps.
Thanks,
Tammy
You should not map to the new domains before they are operational. This will make your subsites unavailable.
Okay so I should NOT map my 1 (main domain) yet and don’t map any others until I buy them and they are ready to go?
Basically there is nothing to map until I do a 2nd domain correct?
Just double checking that I understand what you are telling me
Thanks,
Tam
I have set up a number of network sites and mapped the domain names as instructed. I even asked my hosting company to make the DNS changes as suggest for I use cpanel. However, when I go to my sites via the maped domains and click on page or tap or other link, the that shows up in my original site with the subfolder used to create the network site (originalsite.com/network1/post) How do i get the domain to map through out the site (network1.com/post). I have the option of total maping checked. Please help.
I need help ….I follow the direction to T, still no domain mapping under the super admin or the tools. I just don’t know what to do now. I really want to get it up and runing.
I’ll repeat this comment as it may be your problem:
You may not have activated SUNRISE. Please try to change
this: //define( ‘SUNRISE’, ‘on’ );
to this: define( ‘SUNRISE’, ‘on’ );
The open and close single quotes might catch you on that if you copy and paste it in.
You’d want normal single quotes. Taking off the leading // should suffice to uncomment
it, but someone else mentioned setting it to ‘true’ instead of ‘on’ or something to that effect. I cannot remember which it was, but when I tried one of those, I ended up with the white screen of death and when I set it to the other, things came alive. I still have one problem to debug though.
I have done this: define( ‘SUNRISE’, ‘on’ ); and this to: define( ‘SUNRISE’, ‘on’ ); but still no domain mapping under the super admin or the tools. I just don’t know what to do now. Again I really want to get it up and runing. PLEASE HELP !!!!
For grins, if you go to your laptop or windows box and edit c:\windows\system32\drivers\etc\hosts.txt and add an entry for the new domain you are trying to map your subdomain to, does it work? If so, then it’s almost certainly a DNS configuration or propagation issue.
Im having trouble with this mapping if I put the sunrise cmd in the config file I get this The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around. But if I take it out then I can log in but I cant do any mapping pls send 911
I have a problem and it goes away when I remove the Sunrise script… Here is what I get, when I place sunrize in the wp-config.php file and go back to the dashboard of my base domain, no matter what I click on I get logged out of WP and can’t get back in. My admin login page get redirected to another page that looks like the regular admin login , but it isn’t the same page and I don’t have access. When I remove Sunrise I can log in but WP is looking for Sunrise to be installed. I have checked and changed the ( ‘ ) a number of times. I have called my hosting to see if there was something there not set correctly. Below is the link in my browser with the redirect.
http://infozonetm.com/wp-login.php?redirect_to=http%3A%2F%2Finfozonetm.com%2Fwp-admin%2Fms-admin.php&reauth=1
I don’t now this error. Have you set up the multisite features correctly before adding the domain mapping? Check this guide for assistance: http://www.tripwiremagazine.com/2010/07/get-started-using-the-wordpress-3.0-multi-site-feature.html
Is there a specific spot in the wp-config.php to place the Sunrise comment. I have it placed after the code I added for the multi-site and before /* That’s all, stop editing! Happy blogging. */ on line 90.
When I enter DOMAINONSUBDIR.com in the URL, I get a redirect to:
http://DOMAINONSUBDIR.COM/cgi-sys/defaultwebpage.cgi
The only step I could not do is adding the Parked Domain.
My hosting company does not allow me to add Parked Domains or Addon Domains because my hosting is on a VPS account and I am able to host as many domains in the same account. (initial reason I got – so I wrote a ticket so they can lift this restriction).
Do you know if this is the actual scenario – because my hosting company may not allow me to get Parked Domains?
Or is there something else that I missed?
Adrian
Adrian, the cgi part is not part of WordPress and seams to be some problem with your domain configuration. It must be set up to point at the web folder where your WordPress installation is. How to do this….I have no idea but share with us where you are hosted it may help
ok. after 2 days haggling with my hosting company, I was able to get parked domains and addon domains enabled and available on my VPS account. So I was able to park the mapped domain name.
Let me just clarify my question above. There isn’t a real folder or subdirectory. I was trying to get MAPPEDDOMAIN.COM to the WordPress multisite http://MAINDOMAIN.COM/MAPPEDDOMAIN/
I am still getting the mapped domain going to the http://MAPPEDDOMAIN.COM/cgi-sys/defaultwebpage.cgi.
It looks like I need to back track where the problem is. I did the A Record on my DNS service which is GoDaddy.com.
I do have access to WHM and I tried to do this step – “Add a wildcard subdomain/virtual host record to your site’s DNS record in Web Host Manager (WHM). ”
Two questions because I am missing quite a bit:
1. Why add a subdomain to the DNS record when this procedure is about WP multisite directory implementation?
2. Where do you add this to the site’s DNS, when I can only see DNS Template in DNS. I cannot get specifically to the domain where Wordpress Multisite is installed?
Please advise.
Adrian
Adrian this is a though one. I’m busy today but will try to look into it later
Thanks. I found out that my hosting company has on purpose disabled the other DNS functions. I set out a ticket to have them do the changes – and they did.
When I put the mapped domain into the URL I am now getting the title of the site (specified when I created it) and the RSS symbol. However, I am getting a timeout erro – and a blank page.
I am not sure if this is a DNS propagation issue since I also had to change the GoDaddy.com DNS to my hosting company DNS servers.
There is a timeout error when trying to connect to the mapped domain.
I have followed the setup word for word, but when i place my blog into the browser, i get a message asking me if i want to install wordpress???, if i enter http://mydomain.com/autoblog i get a pageopening with the same template as my domain.
I have successfully enabled multisite, installed MU Domain Mapping and added a second site mapped to a new domain. Everything is working fine, but I have a question about privacy:
My original site is my business site and the new site is entirely personal, and supposed to be anonymous. However, when you watch the browser’s (firefox) path to the new site while it loads (in the address bar at the bottom), you can see it hit the original site address just before the plugin maps it to the new site domain. Occasionally when the servers are busy you can see “waiting for originalsite.com” before it gets mapped.
Is there any way to keep visitors to the new site from ever seeing the address of the original site?
I followed you install directions exactly for the Domain Maapping Plugin and got this message in a lock out of the blog:
“The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.”
I can access the plugin from the c-panel and delete it; but what did I do wrong or not do?
Thanks for any help or assistance,
John
How do you use domain mapping to assign a different IP address to each site?
Hi! Thanks a lot! I did everything as you said, all work. I have a question to ask: can I have individual IP for every site of network?If yes, where I should make changes? (I have VPS Hosting)
No sure you can and I would like to know why you need this?
By the way great that it worked for you! Not everyone managed to make it in the first attempt
I followed your install directions exactly for the Domain Mapping Plugin and got this message which creates a lock out of the blog:
The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.
I’ve tried both define( ‘SUNRISE’, ‘on’ ); and define( ‘SUNRISE’, ‘true’ );
Thanks for any help!
Bob
Well hmmm I have an odd question.
I installed wordpress on the main domain http://www.mydomain.com and set up domain mapping so I could later set up multiple sites as:
http://www.mydomain.com/site2
http://www.mydomain.com/site3 etc.
Why did my permalink structure get automatically set to: /blog/%category%/%postname% ?
The only part about this I don’t like is the /blog/
Is it because I don’t have any other domains yet or since I did domain mapping it is distinquishing this 1st domain as /blog/ because I can’t have it as:
http://www.mydomain.com/%category%/%postname% ?
Just want to find out if I can safely delete the /blog/ part and any blogs added afterwards will still work correctly.
Thanks everyone
T
Any takers as to what’s going on?
Still hoping someone see’s this post who is able to help.
Thanks everyone
I’m having the issue as Bob. I believe I followed the directions to a T, but when I refresh my Admin page and go to ‘Super Admin’ => Admin, the following error screen/message comes up:
” The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.”
I’ve fiddled around with this for a few hours and am at my wits end!
Please, any advice would be appreciated!
J Davis
Did you install WordPress in a subdirectory? As far as I know WordPress MUST be installed on the root of your site to do multi-site at all. It does not work when WP is in a subdirectory.
For example, if you have a virtual host on Apache with Document Root at /var/www/html/, then your installation would need to be there and not in a subdirectory such as /var/www/html/wordpress.
Hi Jeremy – I was unfortunately installing it in a sub directory. As soon as I re-installed it to the root directory everything worked. All it took was to step back, get a cup of coffee and realize my mistake. Take a break and you’ll get it! Good luck…
Thanks a ton. After a good nights sleep I’ll give it a go again in the morning! I do have it installed at http://mydomain.com/blog as opposed to simply on http://mydomain.com .
Again, I’ll give it a go tomorrow… and thank you.
Jeremy Davis
I have followed all instructions and even had some help from my dns host. Now, I’m obviously on the right track, as I no longer have a parked domain page. Instead, americanracingpress.com leads to a Cpanel page. Getting frustrated!
Are you sure your domain is pointing to the right IP address? Typically cpanel is either in a different IP or if on the same IP not served on port 80… I think your hosting should help you out here and I’m sure it has nothing to do with WordPress. It looks to me as your domain is not pointing at the apache server and that is probably due to a wrong A record setting on your DNS.
HELP!
I have read the previous forum about this but need some expert help from the start.
Then go to the new Super Admin->Domain Mapping menu.????????????????????????????
I have followed the previous steps and cannot find this in my super admin.
Please please please someone help me. I really need a complete idiots guide as it has taken me 8 long days to reach this point and now I am losing the will to live………I’m off to make another coffee……anyone want to join me?
Kind regards
Mike
I have a Shared Hosting account. Can I install Wordpress 3.0 in the subdirectory of one of my add-on domains and activate the MU option from there… For example addondomain.com/mainblog/ ? In other words, can I control all my other Wordpress blogs from here, or would I need to install Wordpress in the root directory of the main domain on my hosting account?
Im pretty sure you need to install it in the root. See previous comments for details on this.
Well, in spite of this well written article, I tried doing this for some time and finally gave up and looked for alternate solutions. I found wpmanager which seems to have all the features I need..super easy installation and free! If you are as tech-challenged as me check it out.
Hello,
I have done everything you instructed it all works perfectly EXCEPT for he part about “Tools -> Domain Mapping”. “Domain Mapping” does not exist in my “Tools” menu…only in my “Super Admin” menu. so I’m missing a step. The Second “Domain Mapping” screenshot..I CANNOT find this anywhere in my interface.
Sorry i copied a previous question but that is exactly the problem i am experiencing. Please help!
Next Comments →
{ 5 trackbacks }