WordPress Mu with Domain Mapping

Please note that as of August 11, 2008, Donncha has released a domain mapping plugin that makes this process easier at the cost of creating subdomains off the newly mapped domains. On the other hand, the XML-RPC continues to work.

Introduction

WordPress has been absolutely amazing. It has grown from merely being a blogging platform to more of a CMS/blog platform now. With WordPress Mu (Multi-User), it takes WordPress to a whole new level by allowing for multiple instances of WordPress on one install with one database! The best example of WordPress Mu in use is WordPress.com.

A new feature that was introduced on WordPress.com is domain mapping. Currently when a user visits a WordPress Mu installed site (depending on if the install is subdomain or subdirectory), and signs up for a new blog, the url is http://subdomain.domain.tld/. What domain mapping allows is for a user with a registered domain name to park it on their site at http://subdomain.domain.tld/.

What is the advantage of being able to do this? Well for me, it’s quite advantageous. Since I run multiple WordPress sites, instead of having to download WordPress, upload it, configure it, etc., I can create a new subdomain blog on my main site and then use domain mapping to make the subdomain appear as it’s own domain site. This allows me to share the user tables, themes, plugins, etc. thereby saving space, have only one database to backup and so on.

Unfortunately there is no easy and quick way to do domain mapping with WordPress Mu (yet). There are a few threads on WordPress Mu’s support forum on how to do it, but I figured I’ll make a clear and precise directions on how to achieve domain mapping. Much of the directions I use are from drmike’s thread at the WordPress Mu support forums.

Prerequisites

Before you can use domain mapping on WordPress Mu, there are certain criteria that your WordPress install must meet.

  • It must be a WordPress Mu install and not a WordPress install and it has to be working correctly.
  • The WordPress Mu install must utilize SUBDOMAIN and not subdirectory feature.
  • You must already have a domain name registered that you wish to use.

Please note that while it is not impossible to do domain mapping on hosted websites, it will be much more easy and worthwhile to have at least a virtual private server (VPS) or dedicated server, or you will have to contact your host each time you wish to add another domain to your WordPress Mu install. The instructions I present are based on a person with a VPS.

Disclaimer

I provide these directions for my own reference and for other people who are interested. Use all or any part of this guide at YOUR OWN RISK. I take no responsibility for what may happen by following this guide. Always remember to make backups of your database before making any drastic changes FIRST!!!

Instructions

  1. Login into your domain name registrar, and edit the nameservers to match your WordPress Mu domain nameservers. Most registrars will let you do this yourself, but in some rare cases, you may have to contact them. This process can take anywhere from 10 minutes (if it is a newly created domain name) to 24-48 hours to resolve correctly.
  2. Login into you main site’s cpanel and select PARKED DOMAINS.
    Parked Domains
  3. Under “New Domain Name:”, enter the registered domain name that you want to do domain mapping with minus “www” prefix. In my case, I want to domain map http://www.abunchofcars.com, so I enter abunchofcars.com into the field. Click “Add Domain!”
  4. You should get something to this effect:
    Parked Domain Additions
    
    Using nameservers with the following IPs: 216.246.58.57,216.246.58.58 Bind reconfiguring on vps using rndc
    
    Created DNS entry for abunchofcars.com
    
    abunchofcars.com was successfully parked on top of bui4ever.com

    If you get an error, it usually means that the nameservers have not resolved fully yet and you will have to wait a bit longer before continuing to this step.

  5. Once the domain name has been parked, login into your web host manager (WHM), usually located at http://domain.tld/whm/.
  6. Scroll down the left hand list until you find the category, “DNS Functions”. Click on “Edit DNS Zone” and select the parked domain name and click “Edit”.
  7. Inside you’ll find a bunch of things. What we are looking for is under Domain your parked domain name, TTL of 14400, Record Type of A and next to it an IP address. We want to copy that entire IP address.
  8. Scroll all the way down to where you see “Add New Entries Below this Line”, we need to create a new entry.
  9. This is what you should type in there: *, 14400, A, 216.246.58.46, obviously changing my information to your information.
  10. Click “Go” and you should get a “Zone Modified!” message.
  11. You will need to restart apache for this to take effect. If you have a VPS or dedicated server:
    httpd restart

    in a command line should do the trick.

  12. Now login as Admin to your WordPress Mu site.
  13. Under “Site Admin” > “Blogs” > “Add Blog”, create a new blog naming it anything you want for now. Test to make it sure it works.
  14. Once the new blog has been created, go back to “Site Admin” > “Blogs”, find the newly created blog and select “Edit”.
  15. There are four places we need to make changes at. Under URL, you will see http://abunchofcars.bui4ever.com/, change that to http://abunchofcars.com/. Look for Siteurl, Home, and Fileupload Url and make the same changes as you did with Url, but leaving the suffix of “files” at the end of the Fileupload Url. Please note that it is very important that if the address has a trailing slash, you also include the trailing slash.

  16. Click “Update Options”, once it’s done, you’ll be returned to “Blogs” and notice that the newly created blog no longer is in the list.
  17. Before we can access the newly created blog, we need to make some changes in the MySQL database. Login to your CPANEL and PHPMYADMIN (I highly recommend you get the PHPMyAdmin plugin so you don’t have to always login to CPANEL to access PHPMYADMIN).
  18. Select the correct database from the drop down under “Database”.
  19. On the left hand side, scroll down until you see “wp_blogs”. Click on it and it should open in the right hand side. Click on “Browse” in the menu.
  20. Scroll down and you will see a list of all the blogs that have been registered. At the very end of the list, you should see abunchofcars.com under “Domain”. Click the pencil icon to edit that entry.
  21. Once it finishes loading, we want to change “site_id”’s value to be the same as “blog_id”. For me, abunchofcars.com’s blog_id is 25, so I change site_id 1 to 25, and click “Go”. What this does is remove bui4ever.com (site_id 1) as the “blog owner” and make abunchofcars.com its own blog owner. Also you should remember the blog_id, as you will need it for the next few steps.

  22. On the left hand side, scroll down until you see “wp_site”. Click on it and it should open in the right hand side. Click on “Browse” in the menu.
  23. You should see one entry for your main blog. What we need to do is add an entry for abunchofcars.com. Click on “Insert” and we need to populate three values.
  24. For “id”, we enter the blog_id, in my case, 25. For “domain”, we enter the domain address, so I enter abunchofcars.com. And finally for path, we just put a forward slash (/). Click “Go”.
  25. So when you go back to wp_site and click “Browser”, you see your new entry.
  26. On the left hand side, scroll down until you see “wp_sitemeta”. Click on it and it should open in the right hand side. Click on “Browse” in the menu.
  27. We need to duplicate the contents of “meta_id” 6, the site_admins. Click on the pencil to edit it.
  28. In the “meta_value” field, you will see a big box with an entry:
    a:1:{i:0;s:5:"admin";}

    Copy in its entirety.

  29. Click back on wp_sitemeta, and select “Browse”. Go to the very last entry, and make note of the “meta_id” number. Now click “Insert”.
  30. We need to make entries now, under “meta_id”, enter the next consecutive from the number you made note of in Step 27. In my case, the last entry was 64, so I will be using 65. The “site_id” you use is from Step 19, so I will enter 25. The “meta_key” is site_admins. In the big field under “meta_value”, paste the weird string we copied in Step 26. Click “Go”.
  31. We need to duplicate another entry, click wp_sitemeta and “Insert”. For “meta_id”, we need to use the next consecutive number. Under “site_id”, we use the same number from Step 19. For “meta_key”, enter site_name. In “meta_value”, enter in your parked domain address. In my case, I would enter abunchofcars.com. Click “Go”.
  32. The final entry that needs to be duplicated is “illegal_names”. So go back to wp_sitemeta, and click “Insert”. For “meta_id”, it needs to be the next consecutive number from what was used in Step 29. For “site_id”, enter the site_id from Step 19. The “meta_key” is illegal_names and the “meta_value” entry is
    a:7:{i:0;s:3:"www";i:1;s:3:"web";i:2;s:4:"root";i:3;s:5:"admin";i:4;s:4:"main";i:5;s:6:"invite";i:6;s:13:"administrator";}
  33. Now we should be good to go for testing. Open a web browser and enter in your parked domain address, I enter http://abunchofcars.com and you should see a newly created WordPress blog. If you don’t, a mistake was made somewhere.
  34. The next step is test login. Try your admin login and you should get in fine. Please note, if you type http://abunchofcars.com/wp-admin it will redirect you to your main site’s site admin. It is very important that you include a trailing slash after wp-admin, so http://abunchofcars.com/wp-admin/. Hopefully this issue will be resolved in the near future.
  35. Now another cool feature of the domain mapping, is that you can also create subdomain blogs off of the newly mapped domain. I can create http://how-to.abunchofcars.com and users can also sign up for their own blogs as they do on the main site. Cool huh?
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • E-mail this story to a friend!
  • Reddit
  • Twitter

Tags: , ,

177 Responses to “WordPress Mu with Domain Mapping”

  1. Hone Says:

    Have you checked out this plugin to help with managing domains on mu?

    http://wpmudev.org/project/Multi-Site-Manager

  2. Richard Bui Says:

    Hrmmm, I just noticed it was recently updated. I tried it before and it didn’t seem to *work* for me.

    But I’ll give it a go again and update if it does work. Thanks!

    (7:15pm) Ok, just installed the plugin and it seems to be great! I don’t have another domain to try just yet, but if works like it should, Steps 12-32 will no longer be necessary! I’ll probably leave the directions up for whatever and make some slight changes to reflect this plugin.

  3. Richard Bui Says:

    Ok, I tried the Multi-Site-Manager plugin and there are some issues.

    It doesn’t duplicate the site_admins in Step 30. So when you first login, you have no Site Admin and you get a nice message that says permission denied.

    It doesn’t duplicate the allowed_themes and thus you get this error when you try to change the theme: “Fatal error: Cannot break/continue 1 level in /var/www/blogdomain.com/wp-admin/admin-db.php on line 669.”

    Those are the two major problems so far, otherwise a great plugin.

  4. kevin Says:

    So basically you shouldn’t use the plug in or are there fixes for this.

  5. matt Says:

    Nice work!! Can’t wait to set this up! Many thanks!!

  6. Richard Bui Says:

    @kevin: it depends. The plugin offers a nice user interface and does remove a *few* steps, but you do have to go back into the database to check if it did all the steps correctly. I’m still using it for just whatever, but it probably is quicker to forgo the plugin and do it all manually or until the plugin has these issues resolved.

    @matt: no prob! Let us know how it goes!

  7. matt Says:

    Would this set up allow people to register a blog on the subdomain abunchofcars.com?

  8. Richard Bui Says:

    Matt, yes sir. That’s the beauty of it. You could have 6 domains and utilize the subdomain feature for each one! Go ahead and try it if you like.

  9. matt Says:

    One more question. I have a bbpress integrated on my main site. If a user registers for a blog on say abunchofcars.com with the username/blog carfreak.abunchofcars.com will this prevent people from registers the username and blogname carfreak on the other domains and allow that user to post on the main sites forum?

    Or will I need to do some customization?

  10. Richard Bui Says:

    Matt,

    That’s a good question actually. If you have the WordPress integration plugin for BBPress, that theoretically should sync up any signups from WP and/or BBPress. So in theory, once the username carfreak has been used, it shouldn’t allow any other sites to signup with the same username. There is only one way to test. I have BBPress on this site also, why don’t you try signing up to the abunchofcars.com site with carfreak and see if works signing up here as carfreak too?

  11. kevin Says:

    I followed the instructions, not using the plug-in, everything comes up fine except I am getting this error when I go into the themes of my new domain:

    Fatal error: Cannot break/continue 1 level in /home/pointles/public_html/wp-admin/admin-db.php on line 690

    I am going through to check my tables in php and go over the instructions but thus far everything looks correct.

  12. kevin Says:

    Instructions need to be inserted to copy the allowed themes table, that is what I messed up on! Otherwise this is perfect!

    Thanks again for putting this together

  13. Richard Bui Says:

    Kevin, reference my comment here: http://bui4ever.com/web-itecture/wordpress_mu_with_domain_mapping/#comment-2869

    I need to add it into the list of directions. I didn’t because I was hoping the plugin was going to resolve all the issues.

  14. Janine Says:

    Hello Richard,
    First of all, I have to thank you so much for coming up with this tutorial. I am having problems with it though. I did everything you said but when I go to “http://mysite.com” I am automatically redirected to “http://mysite.com/wp-signup.php” and it gives me an error that says:

    The page isn’t redirecting properly

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    * This problem can sometimes be caused by disabling or refusing to accept
    cookies.

    Do you have any idea of what it could be or what I did? Could it be that for “Site URL” I put “mysite.com/” ?

    Has anyone done this successfully through Site5 hosting? I can’t wait to actually get this to work for me. Thanks so much for your help!

    -Janine

  15. Richard Bui Says:

    Janine,

    Thank you! I’ve had that redirect error before. Try removing the trailing slash after mysite.com in Site URL and see what happens.

    I would go back again through the WP database to make sure that everything was added correctly. I’m trying to remember how I fixed it the last time I got this error.

  16. Hone Says:

    I got to say thanks for this great post and great tutorial.

  17. Eric Says:

    Just wanted to say thanks for this write up. AWESOME STUFF!!!

  18. Richard Bui Says:

    No problem!!

  19. Janine Says:

    Hello again Richard!
    Well, I finally got the chance to redo it and the problem was that I put a trailing slash after the URL. Now, it works perfectly! All I needed to do was insert allowedthemes. Thank you so much for this! You have no idea how long I have been trying to find something like this. Thank you!

  20. matt Says:

    Richard,

    Just set up a bunch of domains using it without a single problem. Thanks for putting together such a good tutorial.

  21. Richard Bui Says:

    Janine,

    Great! That’s a nice theme, what is it called?

    Matt,

    Well, the majority of the credit is owed to Dr. Mike, I just merely put all the information in one place and added pictures. :)

  22. Manish Says:

    Hi Richard,
    Great tutorial man, but my host doesnt allow wildcard DNS :-( Can you people share which host do you people use. May be u can send me a mail in case u dont want to put the list here.
    regards.

  23. matt Says:

    I’m getting the following error when i try to view presentation on the backend.

    Fatal error: Cannot break/continue 1 level in /home/freakin/public_html/wp-admin/admin-db.php on line 690

    Anyclues??

  24. Richard T. Bui Says:

    Matt: please reference comment #3…you have to duplicate the allowed_themes.

  25. matt Says:

    Looked at comment three. Where do I duplicate the allowed_themes? Do I just create a copy in the themes folder for each domain? Thanks!

  26. Richard Bui Says:

    Matt: sorry, I should be clearer, login into the MySQL database and go under wp_site and look for a allowed_themes entry, go into that and copy the entries and do an insert. It’s the *same* procedure as Step 31, but instead of site_name, it is allowed_themes that you gotta duplicate.

    I’ll be updating the directions shortly to reflect these changes.

  27. Manish Says:

    Hi Richard, was waiting for ur messg regarding the webhosts that allow wildcard DNS to host wpmu.

  28. Richard Bui Says:

    I use Autica (which is owned by MidPhase). The easiest way to have wildcards is either to have a VPS (which I have) or a dedicated server. In many cases, shared web hosting accounts will not allow for wildcard DNS.

    If you like, I can also sell you some space, you’ll get your own CPanel and what not and I’ll setup the wildcard DNS for you.

  29. Manish Says:

    Thanks Richard. Can you let me know what would I need to pay for that and how much space would I get. I need to setup around 40 domains using WPMU.

  30. Richard Bui Says:

    Manish, email sent.

  31. matt Says:

    Richard,

    I have some plugins that are displaying new posts, recent comments etc..They are acting really strange give. In particular the fimii plugin displaying new members and recently updated blogs. Could this be due to the domain mapping? Any way to fix or get around it?

  32. Richard Bui Says:

    Matt,

    Without a link to the problem in question, I can’t really tell.

  33. Manish Says:

    Is there anyway to make it work in subdirectory format. Pls refer to David’s recent remark on http://wpmudev.org/project/Multi-Site-Manager/#project_bottom
    He says “you should be alright with subdirectories. “

  34. Richard Bui Says:

    Manish,

    In theory it should work, but I think Dr.Mike had mentioned something about it not working. I personally don’t see why not, but I have not tried it.

  35. matt Says:

    Still working on getting the themes to work. Followed the directions, looked for the theme file in wp_site. Could not find it there are only three entries. Am I missing something?

  36. Richard Bui Says:

    Matt, try looking for allowed_themes or allowedthemes.

  37. matt Says:

    ok!! found both allowed_themes and allowedthemes. So I make a copy referencing the site id of the corresponding domain? Do i need to make copies for both allowed_themes and allowedthemes?

    Really appreciate all your help!
    Matt

  38. Richard Bui Says:

    Matt,
    For each site_id, there should be an allowedthemes.
    You could just dupe both, but either one will be fine.

  39. plusarquitectura Says:

    Can I use this tutorial to redirect a third level subdomain into a second one of the same main domain?

    I have installed WPMU in blogs.domain.tld because I don’t want to mess files in domain.tld with my other CMS (installing in root domain is not an option) When new blogs are created they got this url pattern: blogsname.blogs.domain.tld Is there any way to make the url look like this: username.domain.tld?

    Thank you in anticipation

  40. Richard Bui Says:

    In theory it should work. Your current domain is blogsname.blogs.domain.tld. I’m pretty *sure* blogsname.domain2.tld will work, but you probably want the original domain name to appear.

    So try this, create another blog: test.blog.domain.tld. Follow Steps 14-35 and put test.domain.tld in wp_site and all the places you are supposed to *fix* the domain urls. Report back on whether it works on not.

  41. plusarquitectura Says:

    Thanks Richard,

    My main problem is that I’m stuck at the very begining, in step #24 What would my main domain and path be?

    domain: domain.tld
    path: blogs/domain.tld?

    if so, I’m afraid it doesn’t work, because it displays the content of domain.tld instead.

    I may have done it wrong…

  42. Richard Bui Says:

    domain: blognames.domain.tld
    path: /

  43. iKazoku devDoc » Blog Archive » Domain Mapping Says:

    [...] Reference [...]

  44. Andrew Says:

    I have a stupid question but where exactly should I be installing the David Dean’s multi-site plugin? Which directory? And when should I install it - during the MU installation, or after Mu has been installed?

  45. Richard Bui Says:

    Andrew,

    You stick the multi-site plugin into the wp-content/mu-plugins directory after WordPress MU has been installed. There is no need to activate. Once that is done, under Site Admin, you will see another option: Sites.

  46. Mapping Domains with WPMu at bavatuesdays Says:

    [...] pieces from the WPMu forums and came up with a step-by-step tutorial for mapping domains to WPMu here. A brilliantly done tutorial that makes this process that much easier to even consider. So, if I [...]

  47. Matt Says:

    I have a problem when users try to register. Instead of using the domain it puts the actual url as domain.tld (ex:test.domain.tld) thats the actual url being displayed and used. I’m sure I just missed a step and didn’t put in the url.

    Any idea what I missed or need to change? Other than that they are functioning perfectly.

  48. Jacob Says:

    Any idea why /wp-admin/themes.php doesn’t show?

  49. Richard Bui Says:

    Matt, I’ve had this problem before. Haven’t had a chance to look into it yet. It might be related to the trailing slash problem. For example, when you try to access newmappeddomain.tld/wp-admin it resolves back to mainmudomain.tld’s wp-admin, but if you enter newmappeddomain.tld/wp-admin/ it will take you into the new mapped domain’s wp-admin.

    Jacob, what do you mean themes.php doesn’t show up? It shows up fine for me and all the mapped domains. It might be a plugin issue or a bad install…?

  50. Matt Says:

    Richard,

    Any recommendations on where to go or who to talk with to figure out how to fix this? I’m supposed to launch in two weeks. Any help is much appreciated.

    Thanks,
    -Matt

  51. Matt Says:

    Figured out why I was getting the domain.tld as the address of new blogs. The site wide tags plugin was doing it for some reason. Removed it and the problem stopped.

    DNS wildcard for the parked domain seems to resolve the inability to access the blogs created on parked domains. However still having problems, when someone tries to log onto their blog on a parked domain it just reloads the login screen.

    -Matt

  52. Richard Bui Says:

    Matt,

    Glad to hear one problem is resolved! Which site wide tags solution were you using?

    Checks Steps 19-27 cause it sounds like a cookie issue. Let me know how that goes.

    Rich

  53. Matt Says:

    Rich,

    Checked it twice. steps 19-27 were done correctly.

    Any other ideas?

  54. Richard Bui Says:

    Matt,

    Sorry, I can’t think of anything else. Definitely let me know if you find something out.

    Rich

  55. Richard Bui Says:

    Matt,

    Give this a try.

    Rich

  56. Shane Becker Says:

    Hi,

    Your documentation here is great and I’ve found it really helpful.

    I’m having a redirection issue with a subdomain I set up. Basically when I try to login to sub.domain.com/wp-admin I get redirected to domain.com/wp-admin.

    More info here:

    http://mu.wordpress.org/forums/topic.php?id=6203&page&replies=12#post-37483

    Thought I’d post here in the hope you might be willing to provide some clues.

    Thanks-
    Shane.

  57. Shane Becker Says:

    PS: I hit the login page ok - its just when I enter my login and pass and hit enter it then redirects me (and logs me in) to the main site.
    Shane

  58. Richard Bui Says:

    Shane,

    You’re correct, it’s a redirection issue. You have to add the trailing slash at the end of wp-admin for any mapped domains! For example: site.com/wp-admin/.

    Please read Step 34.

  59. Shane Becker Says:

    Hi,

    Thanks for this Richard. I did read all your instructions (many times!). The problem wasn’t the trailing slash for me. I have fixed the issue now. For the record:

    In the Mu mySQL, in table wp_12_options, I needed to change the value wp_user_roles to wp_12_user_roles (problem carried over from an WP table import). I also copied the users data from the orignal Mu install table over the the imported table. (Note: my blog ID = 12 for my new Mu table).

    I’m still having some issues and will continue to compare the WP and WPMu tables to figure it.

    Thanks for responding.
    Shane.

  60. Ash Says:

    When you say “Please note that while it is not impossible to do domain mapping on hosted websites, it will be much more easy and worthwhile to have at least a virtual private server (VPS) or dedicated server, or you will have to contact your host each time you wish to add another domain to your WordPress Mu install. The instructions I present are based on a person with a VPS.”

    Which step do i need to contact my host regarding?

    Is it in relation to step 12?

    Thanks for the tutorial, very helpful and handy IF i can get it to work!

  61. Richard Bui Says:

    Ash,

    You have to contact your host for Steps 5-11 every time you add a new parked domain.

    If you have a ton of domain names, after awhile your host is going to get tired of doing this real quickly.

    Rich

  62. Ash Says:

    Hmm, strange i don’t have a VPS just a standard reseller account, but i can do steps 5 - 10 but not step 11, so presumably i need to ask my host to do this part.

    I’m assuming if i add all my domains at once, they’d only need to do this again when / if i add additional domains?

    Thanks

  63. Richard Bui Says:

    Ash,

    I’m sorry, I didn’t know you had a reseller account. Yea with a reseller account you can do Steps 5-10, Step 11 is what your host needs to do. But actually in your WHM, you should have a httpd restart…I don’t remember exactly where it is, but it is there. If you find it, you won’t need to even ask your host.

  64. nala Says:

    Nice Site!

  65. Richard Bui Says:

    I’ve started playing with the Multi Site Manager plugin as of late on another WPMU install. It seems to be working pretty well and *may* negate the need for these directions. I’ll continue using the Multi Site Manager and see how that goes.

  66. Mr. Baaps Says:

    Hi,
    I think i followed all instructions given above, everything went fine but when i tried the URL it gave me this error:

    Forbidden
    You don’t have permission to access / on this server.

    Can anybody help?
    Thanks

  67. Nick Says:

    Great tutorial Richard… I just tried it and it works great.

    I’m now wondering which of these steps could be skipped if all I want is to set up and run many different blogs under their own respective domains (i.e. blog1.com, blog2.com, etc,) but *without* the possibility to set up additional subdomain blogs on any of those domains (such as newblog.blog1.com, anotherblog.blog1.com).

  68. Administrative Faculty Theme » Mapping Domains with WPMu Says:

    [...] pieces from the WPMu forums and came up with a step-by-step tutorial for mapping domains to WPMu here. A brilliantly done tutorial that makes this process that much easier to even consider. So, if I [...]

  69. david windham Says:

    awesomeness… thk u..

  70. Multiple Domains on WPMu: Mission Accomplished! at bavatuesdays Says:

    [...] forums and, as usual, Dr. Mike came up with the hack that was ultimately turned into a tutorial here and then, to make things even easier, a plugin [...]

  71. » Mapping Domains with WPMu WPMu Ed Says:

    [...] pieces from the WPMu forums and came up with a step-by-step tutorial for mapping domains to WPMu here. A brilliantly done tutorial that makes this process that much easier to even consider. So, if I [...]

  72. Administrative Faculty Theme » Multiple Domains on WPMu: Mission Accomplished! Says:

    [...] forums and, as usual, Dr. Mike came up with the hack that was ultimately turned into a tutorial here and then, to make things even easier, a plugin [...]

  73. » Multiple Domains on WPMu: Mission Accomplished! WPMu Ed Says:

    [...] forums and, as usual, Dr. Mike came up with the hack that was ultimately turned into a tutorial here and then, to make things even easier, a plugin [...]

  74. adventures of a blogjunkie » Blog Archive » del.icio.us bookmarks for November 22nd Says:

    [...] WordPress Mu with Domain Mapping - [...]

  75. Bart Says:

    so I just went though the process.. I used the directory method instead of the subdomain… my question is do we lose the ability to track per account stats… meaning through cpanel i can nolonger see webalizer stats for each domain… they’re all together now… not ahuge deal cause i use analytics but would be nice if there was a way to get this working as well.. I do have root access to my vps box… any thoughts?

  76. Richard Bui Says:

    Yes, you lose the ability to track the stats because it’s a parked domain and doesn’t register like if it was it’s own self hosted domain.

    The best bet is to use Analytics. I do find that other companies (Alexa and so forth) are able to independently track each domain even though the domains are all parked on one domain. Have you considered using Automattic’s WordPress Stat? I use that with good results.

  77. Giancarlo Says:

    Hi i follow all the steps and everything is working nicely,but! when i try to upload something im getting this error

    Warning: Invalid argument supplied for foreach() in /home/webnet/public_html/wp-includes/functions.php on line 1115

    This only happens with the blogs that are mapped. Any ideas?

  78. Richard Bui Says:

    Hrmm, I’m not 100% sure why you’re getting that error. Have you upgraded to WPMU 1.3? Check the site_meta table in the MySQL database to see if there are any discrepancies because it sounds like the path isn’t being mapped correctly. Also check wp-content/blogs.dir/ to see if the files are being uploaded.

  79. Bart Says:

    hmm what about instead of using parked domains if we used addon domains? Addon domains use separate stats… what’s the coronation between the parked domain and wpmu?

  80. Richard Bui Says:

    Bart,

    Based on my understanding of parked domains vs. addon domains, I’m not 100% sure it will work. Because WPMU creates the subdomains and subdirectories virtually, utilizing parked domains allows WPMU to virtually use the parked domains to reroute to the various virtual subdomains.

    With addon domains, your creating an actual directory linked to the domain name. It doesn’t work for what you want because physical folders take precedence over virtual folders.

    For example:

    I create a new subdomain, world.bui4ever.com. It works like it should via the WPMU engine. Then let’s decide I wanted to created a subdomain also called world and thus it would also exist at world.bui4ever.com. Once the subdomain is created, when a user visits world.bui4ever.com they will get the subdomain folder on the server rather than triggering WPMU to pull up the world.bui4ever.com WPMU subdomain.

    You could try some fancy .htaccess redirects, but I don’t think that will work either and only serve to bog down your server. I like AWStats, but keep in mind that AWStats generally differ (greatly) from other web traffic stat sites.

  81. ?? WordPress MU ??? | Dreamcolor's Cote Says:

    [...] http://bui4ever.com/web-itecture/wordpress_mu_with_domain_mapping [...]

  82. ?? WordPress MU ??? | Dreamcolor's Cote Says:

    [...] http://bui4ever.com/web-itecture/wordpress_mu_with_domain_mapping [...]

  83. Johan Says:

    Hi Well done on the tutorial and thanks for the support. Before I decide on manual or Multi Site Manager; can you please share with me any news on your investigations regarding Multi Site Manager?
    Johan

  84. Richard Bui Says:

    the Multi-Site Manager is a nice plugin that saves a step or two. The issues I’ve noticed so far are 1) you have to clone Site Admins manually in phpmyadmin. 2) Organization seems a bit wonky. The Site ID assignment does not match logical with the Meta ID.

    I honestly think it’s better to manually do it one by one. This might not be time efficient if you have a lot of domains to manage, but atleast it will be easier to trouble shoot.

  85. Johan Says:

    Thanks. Yes will go for the manual option. Johan

  86. Johan Says:

    Hi I should have asked as I cannot find it searching; in which plugin directory do you upload PHPMyAdmin plugin? Thanks Johan

  87. Richard Bui Says:

    you upload it to so-content/plugins/ and activate it.

  88. Bart Says:

    hi there I’ve lost some major rankings because of lack of www prefix… is there anyway I can implement this while still adding the www prefix? if i use htaccess right now I just get into a infinite loop… pls help thank you

  89. Richard Bui Says:

    Bart,

    You could do it with .htaccess, but DNS might be the better way to go. But that also depends on what kind of access you have to your webhost.

    Read here:
    http://photomatt.net/2003/02/03/reset-links/
    http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/

  90. Richard Bui Says:

    Also, not sure if this is related, but a bit ago Google had “flushed” a bunch of people’s PR. My PR went from 4 to 0 overnight and has been stuck there until recently. Now I’m back to 4 again.

    [EDIT] Bart I just checked your PR and it seems fine: http://prchecker.info/check_page_rank.php. I checked both with www and no http://www. What should it be?

  91. Matt Ruffino Says:

    tutorial worked perfectly!

    But the plugin menu is not in the admin panel? I can see them on a subdomain, but not on a custom one?

  92. Richard Bui Says:

    have you tried enabling plugins under the Site Admin panel?

  93. John Says:

    Great article. I need to have unique IP-numbers per domain hosted on one Wordpress MU installation.

    Is this also possible? Any pointers?

  94. Richard Bui Says:

    John,

    Thank you! To do unique IP to domain, you’re going to have to get fancy with DNS. Use your WHM and use, I’m not 100% sure, A pointers (or maybe C…but I think C pointers are for names…)… You’ll definitely have to read up a bit…but I THINK that’s how you’ll accomplish what you want.

  95. ??????? » Blog Archive » ?????? Says:

    [...] ????WordPress Mu with Domain Mapping?????shining.ft.xmulib.org???????shining.xmulib.org? Tags: domain, mapping, wpmu, ??, ?? [...]

  96. Multiple Domains on WPMu: Mission Accomplished! — Plugin Test Blog Says:

    [...] forums and, as usual, Dr. Mike came up with the hack that was ultimately turned into a tutorial here and then, to make things even easier, a plugin [...]

  97. ???? » wordpress mu ?????? Says:

    [...] 34 ????????? http://abunchofcars.com/wp-admin ???????????????????????http://abunchofcars.com/wp-admin/,????????????????? ?????http://bui4ever.com/web-itecture/wordpress_mu_with_domain_mapping [...]

  98. MiguelFC Says:

    Thanks man! It felt goood!

  99. Richard Bui Says:

    Thanks for visiting and thanks for the link love!

  100. Zuosa Inside » wordpress mu ?????? Says:

    [...] ?? ??(??) Email(??) [...]

  101. Wordpress’s Pieces » wordpress mu ?????? Says:

    [...] ?? ??(??) Email(??) [...]

  102. » ?Wordpress Mu???????[??????] Says:

    [...] ?Wordpress Mu??????? 2008-03-18 | 2:39 pm??????? | 1 views ???????http://bui4ever.com/web-itecture/wordpress_mu_with_domain_mapping [...]

  103. Akashic Says:

    I love you.

  104. extife Says:

    Hello!
    Your site is just amazing!
    Good luck!

    http://buyxanax.ning.com/

  105. wordpress????? | DoHome Says:

    [...] http://bui4ever.com/web-itecture/wordpress_mu_with_domain_mapping ZT:15??????wordpress?? [...]

  106. Brayne Says:

    I had done this a year ago and forgot the process. Thanks for the helpful post! What step could/should I eliminate so the new domain does NOT have the ability to offer multi blogs? Thanks in advance.

  107. EdG Says:

    did anyone get the error mentioned above in the comment by # Giancarlo that was posted on December 7th, 2007? I just finished a clean install of latest wordpress MU and I followed the instructions to setup domain mapping. I am now getting the same error Giancarlo mentions about the Warning: Invalid argument supplied for foreach() in functions.php on line 1122 when trying to upload files through the addon TLD blogs. Has anyone found a solution to this?

  108. Richard Bui Says:

    @Brayne: There really isn’t any step to skip. But if you want to handicap the site from being able to have subdomain blogs, don’t do Steps 5-10, the wildcard DNS entries.

    @EDG: Make sure you don’t have a line break somewhere in the PHP code. That is always a sure shot for PHP errors.

  109. Johan Says:

    Hi Richard
    I am trying to access these tables you mentioned through phpMyAdmin. I went and had a look at each database I have but cannot find wp_blogs, wp_signups etc. I know this is my problem but you may help me. My host is hostgator.com

    Thanks for the tutorial and the support.

  110. Eia Says:

    Thanks for this guide! Hope you’ll always keep it up to date!

    Btw a minor, minor thing. Step # 16:
    “Click “Update Options”, once it’s done, you’ll be returned to “Blogs” and notice that the newly created blog no longer is in the list.”

    That didn’t happen here, was still in the list.

  111. EdG Says:

    Hey Richard. I tried checking out the foreach function and there doesn’t seem to be anything wrong with my code. I did not make any changes to it and I have the original file I downloaded off of wordpress’s site. Any chance anyone else had this problem before and fixed it?

  112. Johan Says:

    Hi Can someone help me to do this. I am willing to pay you. I get step 22. This is mostly because my phpmyadmin looks different to the images shown above and due to table names that are different. If you can give me a hand you may email me at johanhorak at gmail dot com. Thanks

  113. Richard Bui Says:

    Eia: I think with WPMU version 1.3 or greater that has changed. But thanks for the update!

    EDG: The only other thing I can think of is to try from step 1 again or try another domain if you have one available.

    Johan: I’ll try to help you when I can. I’ll email you when I get an opportunity.

  114. Johan Says:

    Hi Richard
    My host Hostgator tells me that it can be done. This is what they want me to do: “you will need to get a dedicated IP to have this work”. Is this correct?

  115. Justin Says:

    I am running the multi site manager plugin and it’s working for me. I have my main site that runs mu at domain1.com. Anybody can register and get sub.domain.com,sub2.domain1.com etc… and it works great.

    I also have about 15 other domain names (domain2.com, domain3.com etc…. that are parked on top of domain1.com. They are all working as individual blogs running off of the mu installation that is at domain1.com. all of my dns settings appear to be correct and setup as wildcard. It appears subdomain support is working. It just seems like subdomain1.domain.2 takes me to an empty folder and isn’t running mu.

    My problem is that a user can create a subdomain1.domain1.com but not subdoain1.domain2.com.

    So subdomains work on the main site that mu is installed under but not the domains that are parked.

    When you go to subdomain1.domain2.com it directs you to a page as if there is no index.php there. It’s not a 404 error it’s like it takes you to an empty folder.

    Index of /
    Name Last modified Size Description
    ——————————————————————————–
    Parent Directory 12-Apr-2007 13:39 -

    ——————————————————————————–

    Apache/1.3.39 Server at servS1QN9W9U.sn.sourcedns.com Port 80

    If anybody knows how to fix this please help.

    My goal is users can create new blogs on parked domains.

    Any ideas

  116. Richard Bui Says:

    Justin,

    You’re sure that you made wildcard DNS entries for each of the domains? It’s not enough to just have a dns wildcard for domain1.

    Once you park a domain, you should be able to create sub domains from that new parked domain.

  117. Justin Says:

    Richard,

    Yeah, the subdomains are being creted and working fine. They are just taking me to a blank folder instead of two an operational wp mu site.

  118. Justin Says:

    Last post to correct my spelling should have said:

    Yeah, the subdomains are being created and working fine. They are just taking me to a blank folder instead of to an operational wp mu site.

  119. Richard Bui Says:

    Justin: One cause of this is if you have a folder or subdomain with the same name. Physical folders on the server will override virtual folders. I would also check your httpd.conf file to make sure that any physically created subdomain folders appear before the WPMU entries.

  120. Justin Says:

    Thanks Richard but I am still at a loss. I really don’t think I know enough about it. Basically all of my parked domains are pointed to the main domain that is running mu’s public folder in the httpd.

    If you have any other ideas I’d love to hear them

  121. De Purple Flute » Blog Archive » RIP 59network, reborn alloytm.com Says:

    [...] to be more confidence in their services. It was nonetheless thanks to the guidance of Richard Bui . He illustrated very nicely how-to have two domains under one wordpress hood. Althought there is [...]

  122. a different tune » Blog Archive » Migrating to Wordpress MU Says:

    [...] the documentation is not good, but I found I could get by using some helpful tutorials by Richard Bui and Jerry Huang. Wordpress MU has multi-site capability as shipped, but it doesn’t allow you [...]

  123. Reid Walley Says:

    Totally kick-ass instructions! Very daunting when I first read through it all, especially because I had to go through HostGator tech support for steps 5-11. But I hunkered down and went through each one slowly. AND IT WORKED:) I totally have domain mapping now. Thanks Richard Bui!

  124. Richard Bui Says:

    @ Reid: Thank you! Glad it works for you!

  125. Chris Says:

    I’m not quite there yet. Still trying to figure out how to enable/disable wpmu site admin privileges on a site by site basis amongst other things -I’ll find it.

    Question 1: With all of this happening at the db level, are there any edits required in the root .htaccess file? If parked2ndwpmu.tld has a non-wpmu directory (e.g.forum) do I duplicate the appropriate entries for that parked domain? My guess is yes, as we’re dealing with a physical folder. Does this change of you use the plugin? Again, my guess is no.

    Thanks.

  126. Richard Bui Says:

    @ Chris: Question 1 - One of the biggest advantages/disadvantages of this method is that WPMu doesn’t know what physical folder belongs to what domain since there is only one physical place where WPMu is installed and all the other domains are parked. For example, if you access: http://bui4ever.com/rbp/ and http://andreaandrichard.com/rbp/ you should get the same exact thing. This is a physical folder I created on the public_html level. There is nothing that you need to do in the .htaccess. That’s the good news. The bad news is, let’s say you want to install a third-party non-WP calendar system. So you make a calendar folder and drop all the files in there. You use the calendar for one site, and later decide you want the calendar on the other site also, but the /public_html/calendar/ is already taken so you would have to use a different folder name or you have to use the same exact calendar. You will have to make some changes in the httpd.conf file if you plan on creating sub-domains in CPANEL, but you will still be limited by the same problem and WPMu in sub-domain mode won’t like that either.

    Question 2 - Nothing changes even if you use the plugin.

  127. Chris Says:

    Hmm, that’s actually good confirmation of the “it’s using the same code-base/file structure dummy!” understanding that I had.

    So my parent wpmu site e.g. dogblogs.com will serve forumblue.dogblogs.com to little.dogblogs.com/forumblue and mighty.dogblogs.com/forumblue

    Nooice…

    Question 2: That should make global categories and tagging a breeze or do I carry the one ring idea too far?

    Question 3: As parked domain wpmu instances differentiate themselves on taxonomy, those changes are local to that site’s wp_45_terms table and are not automagically aggregated in wp_1_terms table, correct?

    Cheers.

  128. Richard Bui Says:

    So my parent wpmu site e.g. dogblogs.com will serve forumblue.dogblogs.com to little.dogblogs.com/forumblue and mighty.dogblogs.com/forumblue

    Yes and no. It’ll work so long as the forum is a stand alone forum and not BBPress or some other integrated forum. It has to be completely independent or cookies and what not will be a nightmare. For the most part it should work like that. Keep in mind that you *can’t* have different looks for the forum depending on the domain you’re coming from. So the forum either needs to have it’s own look or it’ll look like one of the domains.

    Question 2 - No. Global categories has been a huge discussion at http://mu.wordpress.org/forum. Basically each blog has it’s own wp_x_categories table. WordPress.com probably has a master wp_categories table that integrates somehow with the wp_x_categories table. Unless you can replicate something like that you, you will have to do what others on the MU forums are doing such as what Dr.Mike created using a completely separate stand alone WP install to handle categories. Obviously this will increase load time and query time and increase complications into the site.

    Question 3 - Correct. Each parked domain will only modify it’s wp_xx_terms table and not the master table.

    Also one other thing that you should know about this entire domain mapping process, which may or may not affect you. The method of domain mapping that has been developed here basically comes at a cost: you lose the ability to use the xmlrpc which allows you to remote post via email or other third-party software. For the most part, this may not bother you or you may not care, but it is important to know.

  129. Rob Says:

    In my case, i’m trying to automate the creation of subdomain blogs in the sub-subdomain.subdomain.domain.tld namespace:

    But, with MU, each time a person creates a new blog, we have to manually update apache conf files and set up that sub-subdomain.

    Do you see a way to automate that process so that when someone signs up for a blog they don’t have to wait 24 hours for other stuff to line up? Has anyone ever done that?

  130. Richard Bui Says:

    Originally Posted By RobIn my case, i’m trying to automate the creation of subdomain blogs in the sub-subdomain.subdomain.domain.tld namespace:

    But, with MU, each time a person creates a new blog, we have to manually update apache conf files and set up that sub-subdomain.

    Do you see a way to automate that process so that when someone signs up for a blog they don’t have to wait 24 hours for other stuff to line up? Has anyone ever done that?

    Rob, have you tried adding a wildcard entry as such into the apache conf file as such: *.subdomain.domain.tld

    That way any new sub-subdomains created under subdomain.domain.tld will automatically work. Try it and report back.

  131. jumpsky Says:

    I don’t modify MYSQL.I just modify the url at control panel.But it can run ok. http://dvi8.com.cn

  132. ???? Says:

    ??????????????????PR???

  133. C-Net Solutions Says:

    [...] plugin. It certainly didn’t help me when I needed it… i.e. editing the DB. I used this tutorial. Check that link for the entire tutorial. I’ll repost the meat, [...]

  134. Rob Says:

    @Richard Bui - All virtualhost directives are in the /conf/extra/httpd-vhosts.conf file on our server. So something like the following under the directive in that file, then?

    ServerName *.subdomain.domain.tld

  135. Richard Bui Says:

    @Rob - Yup.

  136. Rob Says:

    @Richard Bui - Well, I got the following set up in the vhosts file, but new blogs still don’t activate on new sub-subdomains:

    ServerAdmin xxx@xxx.net

    DocumentRoot /path/to/wordpress

    DirectoryIndex index.htm index.html index.php

    ServerName subdomain.domain.tld
    ServerAlias *.subdomain.domain.tld

    ErrorLog /path/to/logs/wordpressmu-error_log

    CustomLog /path/to/logs/wordpressmu-access_log custom

    Options All

    Order allow,deny

    Allow from all

    DirectoryIndex index.html index.cfm index.htm

  137. Rob Says:

    @Rob - Oops. The angle brackets got interpreted as HTML on that last reply, but you get what I mean.

  138. Tully Says:

    Hi Richard,

    All things WPMU and domains seem to keep pointing me back to you, so I thought I might post my question and see if you could point me in the right direction…

    We have a site (site1.com) and it currently has MU installed (site1.com/blogs) with a couple blogs up and running (site1.com/blogs/blog1 and site1.com/blogs/blog2).. We have a bunch of other domains which will require blogs and my thought is to move the MU from site1.com onto it’s own server (sitex.com) and run everything from there - one install serving up all the blogs for all the sites…

    Ideally the actual location of blog1 would be sitex.com/blogs/blog1, yet if you were to visit site1.com, and click on the appropriate link to blog1, it would load up as site1.com/blogs/blog1…

    Now, site1 might have 5 blogs, site2 might have 3, site3 might have 6, etc. etc.. All the blogs are under sitex.com/blogs/ yet regardless of which site you were on (site1-6) it would appear as if the blog was part of that particular site.

    Is this even possible? I get the sense that it is, and really I guess I’m trying to map a folder on a server, to a folder on another server, right? Any suggestions?

  139. Richard Bui Says:

    Originally Posted By TullyHi Richard,

    All things WPMU and domains seem to keep pointing me back to you, so I thought I might post my question and see if you could point me in the right direction…

    We have a site (site1.com) and it currently has MU installed (site1.com/blogs) with a couple blogs up and running (site1.com/blogs/blog1 and site1.com/blogs/blog2).. We have a bunch of other domains which will require blogs and my thought is to move the MU from site1.com onto it’s own server (sitex.com) and run everything from there - one install serving up all the blogs for all the sites…

    Ideally the actual location of blog1 would be sitex.com/blogs/blog1, yet if you were to visit site1.com, and click on the appropriate link to blog1, it would load up as site1.com/blogs/blog1…

    Now, site1 might have 5 blogs, site2 might have 3, site3 might have 6, etc. etc.. All the blogs are under sitex.com/blogs/ yet regardless of which site you were on (site1-6) it would appear as if the blog was part of that particular site.

    Is this even possible? I get the sense that it is, and really I guess I’m trying to map a folder on a server, to a folder on another server, right? Any suggestions?

    Tully,

    My suggestion is to setup MU on a main site as sitex.com or whatever. Then domain map other domains as you need. I think Rob is trying to do something similar, but it’s not working out so well and I don’t have an idea why not at the moment either.

    If I understand you correctly:

    sitex.com is where MU is installed.

    you want sitey.com to point to sitex.com/blogs/site1 but want it to show up as sitey.com? But then you want subdomain.sitey.com to also point to sitex.com/blogs/site1/subdomain?

  140. Richard Bui Says:

    @Rob - I have to think about this for a while.

  141. Tully Says:

    If I understand you correctly:

    sitex.com is where MU is installed.

    you want sitey.com to point to sitex.com/blogs/site1 but want it to show up as sitey.com? But then you want subdomain.sitey.com to also point to sitex.com/blogs/site1/subdomain?

    MU Installation: sitex.com/blogs/(blogs1-3)
    Blog 1: sitey.com/blogs/blog1
    Blog 2: sitey.com/blogs/blog2
    Blog 3: sitez.com/blogs/blog3

    Want each site to appear to be running their own blog, yet on the backend it is served up by a completely different server which is maintaining all blogs for all sites. No subdomains - all subfolders.

  142. Richard Bui Says:

    @Tully - I have to think about this for a bit. I’ll let you know when I have a solution.

  143. Craig Says:

    I’m going a bit mad over this issue. I’m just moving into MU — mainly because of this feature. However I just can’t get it working.

    I’ve started a thread on the MU forums but no-one’s been able to help me so far. Any help appreciated.

  144. Richard Bui Says:

    @Craig - Are you 100% sure that the domains are parked? I read in your thread that it doesn’t accept anything other than .com, but have you tried to manually make the entries into your httpd.conf file?

  145. Craig Says:

    The entries were fine, but apparently in the wrong place. Media Temple runs all the sites through a “domains” subfolder within root. I was making the entry in the root directory. Thanks for your time and this tutorial Richard. It’s a great resource on its own and it’s wonderful that you give such great support for it.

  146. Richard Bui Says:

    @Craig - I’m glad to hear it! So when you made the entries into the subfolder, it worked fine?

  147. Craig Says:

    Yes, for (mt) media temple’s (gs) gridservice the symlinks have to be in the /domains folder.

    The system isn’t sending emails from the new domain: I think that’s an unrelated problem though.

  148. WPMu Domain Mapping Plugin on CPanel at bavatuesdays Says:

    [...] on WPMu over the last year or so. Up and until tonight I have been using Richard Bui’s tutorial here along with David Dean’s Multi-Site Manager Plugin. The combination of the two have worked [...]

  149. Administrative Faculty Theme » WPMu Domain Mapping Plugin on CPanel Says:

    [...] on WPMu over the last year or so. Up and until tonight I have been using Richard Bui’s tutorial here along with David Dean’s Multi-Site Manager Plugin. The combination of the two have worked [...]

  150. » WPMu Domain Mapping Plugin on CPanel WPMu Ed Says:

    [...] mapping on WPMu over the last year or so. Up and until tonight I have been using Richard Bui’s tutorial here along with David Dean’s Multi-Site Manager Plugin. The combination of the two have worked great [...]

  151. Richard X. Thripp Says:

    Great tutorial. I followed it and found the last part, “I can create http://how-to.abunchofcars.com and users can also sign up for their own blogs as they do on the main site,” the most enticing, but it isn’t working. I have http://thripp.com/wp-signup.php and http://daytonastate.org/wp-signup.php (the add-on), and registering sites works fine for me or logged-in users, but when new users try it, they can’t log in to their accounts after activation, because either wp-signup.php or wpmu-functions.php writes the site_id field to the wp_blogs table as “1″ regardless of the domain. Their accounts work fine when I edit the database myself, but do you have any suggestions for solving the problem at the source? Thanks so much.

  152. Richard Bui Says:

    Originally Posted By Richard X. ThrippGreat tutorial. I followed it and found the last part, “I can create http://how-to.abunchofcars.com and users can also sign up for their own blogs as they do on the main site,” the most enticing, but it isn’t working. I have http://thripp.com/wp-signup.php and http://daytonastate.org/wp-signup.php (the add-on), and registering sites works fine for me or logged-in users, but when new users try it, they can’t log in to their accounts after activation, because either wp-signup.php or wpmu-functions.php writes the site_id field to the wp_blogs table as “1″ regardless of the domain. Their accounts work fine when I edit the database myself, but do you have any suggestions for solving the problem at the source? Thanks so much.

    That’s the major drawback of domain mapping a site and then creating subdomain off of it. For the longest time, WordPress.com had to manually make the database change also. Most recently, Andrew Billits of EduBlogs.org fame had figured out how automate the process. Unfortunately it’s quite complicated and requires core hacks to Apache to accomplish.

    For the most part, you’re stuck with having to make manual database changes or asking Andrew how he did it. I wish I had a solution.

  153. Richard X. Thripp Says:

    @Richard Bui - Wow, I thought this was a simple edit I was just overlooking. I don’t feel so bad about spending hours trying to figure this out now, if it really is that hard to do.

    Are you sure you have to edit Apache? Seems like this could be something kept to WordPress MU, unless Apache needs to tell WPMU which domain it’s on but isn’t now because of the domain mapping.

  154. Richard X. Thripp Says:

    @Richard Bui - I’ve done it! I’ve been thinking how to tackle the problem for hours, and finally I thought, why not handle it upon activation? It’s only the site_id that needs changed. I added two lines below ” $result = wpmu_activate_signup($key);” in wpmu-activate.php:

    global $wpdb;
    $wpdb->query(”UPDATE $wpdb->blogs SET site_id = ‘4′ WHERE domain LIKE ‘%.daytonastate.org’”);

    This is a brute-force, crass way of handling it, but it works. Replace “daytonastate.org” with your mapped domain and “4″ with its site_id. I tested it. I created and activated a blog while logged out, and I can sign on immediately and the site_id in the wp_blogs table is correct.

  155. Richard Bui Says:

    @Richard X. Thripp - Richard, sorry I was thinking of something else. Editing the Apache was for automating the domain mapping process so that no human interaction was necessary, not quite what you were looking for.

    I’m glad you figured it out! Thank you for sharing the information so others might benefit also!

  156. Richard X. Thripp Says:

    @Richard Bui - You’re welcome! That makes more sense; didn’t think Apache would be involved with what I was asking. http://daytonastate.org is live now.

    Donncha has cooked up a plugin for automated domain mapping. I haven’t tried it since it seems to require a static IP, which I don’t have.

    All I need now is cookie sharing between Thripp.com and DaytonaState.org. WordPress.com has figured it out; if only they’d share their secrets.

  157. Richard Bui Says:

    @Richard X. Thripp - That’s awesome! Congrats!

    I did write about how to use Donncha’s plugin here. It’s a great plugin, very simple to use, but unfortunately you lose the ability to make subdomains.

    I think some people on the MU forum was close to figuring out the cookie issue. But yes, that would be nice.

  158. Adria Richards, But You're a Girl.com Says:

    Richard,

    Great post!

    This walkthrough helped me setup my first WPMU install a few months back. Until I started reading about WPMU, I had no idea blogging was so popular with faculty in the academic world.

    Thanks for such a detailed posting. I’m going to try Donncha’s plugin in the next few weeks to see if I can cut out some setup time.

  159. Adria Richards, But You're a Girl.com Says:

    Richard,

    Great post!

    This walkthrough helped me setup my first WPMU install a few months back. Until I started reading about WPMU, I had no idea blogging was so popular with faculty in the academic world.

    Thanks for such a detailed posting. I’m going to try Donncha’s plugin in the next few weeks to see if I can cut out some setup time.

  160. Richard Bui Says:

    Originally Posted By Adria Richards, But You’re a Girl.comRichard,

    Great post!

    This walkthrough helped me setup my first WPMU install a few months back. Until I started reading about WPMU, I had no idea blogging was so popular with faculty in the academic world.

    Thanks for such a detailed posting. I’m going to try Donncha’s plugin in the next few weeks to see if I can cut out some setup time.

    Adria,

    Not a problem! Yea, I think blogging opens up a whole new world especially in the academic arena.

    Glad the directions were helpful! WPMU has been a huge help in allowing me to maintain and create new blogs quickly and manage them all easily.

    Donncha’s plugin has been great! I’m using it for a few different sites and it works great! Highly recommended.

    Good luck!

  161. ???WPMU??????????? | ??? Says:

    [...] ????? http://bui4ever.com/2007/06/wordpress_mu_with_domain_mapping/ [...]

  162. Gennady Says:

    The people in such cases, said so - Avos will be alive, maybe pomrem.

  163. nanangms Says:

    Install WPMU with Controlpanel 11 is easy. Try this …

    If your hosting work with subdomain unlimited and Control Panel 11 your hosting is ready and no need anything again to install WPMU.

    Try this:
    from Controlpanel 11 create subdomain * (This is asterix, your subdomain like *.yourdomain.com)
    Install WPMU and create database.
    Chmod public_html and wpcontent and .htaccess to 777
    continue install WPMU.
    Finish.

    WPMU work 100%. Try my test page (only for test) at http://iklani.co.cc

  164. Vince Says:

    Thank for this work, it was a huge help! I’m so close to having this work, but not sure what I’m missing.

    I’m doing some testing for proof of concept, and here is where I am.

    The original site is working fine for blogs, and subdomain.blogs. See: http://roadsterlife.com and http://test.roadsterlife.com

    I then set up a parked domain and did the WHM change for DNS zone. http://saxousers.com seems fine and admin seems to be fine. But, when I set up new blogs, I don’t get the blog, only a root level folder. See: http://test2.saxousers.com/

    I think i read through all of above, but didn’t see this problem. I’d hugely appreciate some help with this.

  165. Richard Bui Says:

    @Vince - Do you have any physical subdomains named test2?

  166. nanangms@gmail.com Says:

    I tried wldcard in http://saxousers.com and run normally. I look your WP like single User.

    Problem not from Hosting, Problem in WPMU setup. Try Change Chmod .htaccess, Public_html and wp=content to 777.

    or Uninstall All WPMU + Database and themes. And

    Use ORIGINAL WPMU source to new install …

  167. Vince Says:

    - Do you have any physical subdomains named test2?

    i don’t think so.. but I’ve tried about 6 or 7 subdomain tests and no luck with any except for the original domain that was set up, roadsterlife.

    * roadsterlife.com/
    * test7.roadsterlife.com/
    * test8.saxousers.com/
    * test2.saxousers.com/
    * test.saxousers.com/
    * saxousers.com/
    * blog1.saxousers.com/
    * blog2.roadsterlife.com/
    * blog4.saxousers.com/
    * test.roadsterlife.com/
    * test9.saxousers.com/
    * surf-turf.com/

    is there a file, or a database where these subdomains are mapped?

    >>Try Change Chmod .htaccess, Public_html and wp=content to 777.

    Sounds a bit dangerous?

  168. nanangms@gmail.com Says:

    >>Try Change Chmod .htaccess, Public_html and wp=content to 777.

    Sounds a bit dangerous?

    dont forget to set the permissions back after WPMU working.

  169. Vince Says:

    Well, I got rid of the old and set up a completely fresh WPMU with an new database. I parked the domains again, and setup the wildcards for them.

    Again, I have the same problem.

    THe original parent site works fine. roadsterlife.com, and test1.roadsterlife.com

    The second domain is saxousers.com and the root level domain blog works fine, admin works, but the subdomains just point to an empty directory.

    test1.saxousers.com or
    newtest.surf-turf.com/

    Do I have a path wrong? Has anyone had this issue here?

  170. Vince Says:

    I found the problem in my virtual host file. Maybe it’s a WHM/cpanel thing?

    Anyway, I had to make changes to httpd.conf :

    ServerName roadsterlife.com
    ServerAlias http://www.saxousers.com saxousers.com *.saxousers.com
    ServerAlias http://www.surf-turf.com surf-turf.com *.surf-turf.com
    ServerAlias http://www.roadsterlife.com *.roadsterlife.com
    DocumentRoot /home/roadster/public_html
    ServerAdmin webmaster@roadsterlife.com
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/roadsterlife.com combined
    BytesLog /usr/local/apache/domlogs/roadsterlife.com-bytes_log
    ## User roadster # Needed for Cpanel::ApacheConf

    User roadster
    Group roadster

    ScriptAlias /cgi-bin/ /home/roadster/public_html/cgi-bin/

    I had to add the *. wildcard entry and now it works fine.

    I got the info here: http://www.blogopreneur.com/2006/11/06/installing-wordpress-mu-on-a-cpanelwhm-server/

  171. Richard Bui Says:

    @Vince - You know, that’s funny. I was just kicking around that in my head thinking maybe the server alias isn’t there.

    Glad you resolved the problem!

  172. James T Says:

    I followed your instructions on splitting the domain and it works great especially the feature to create subdomains from the split domains… I have just one small issue and now that the split blog is not in the main dashboard and has its own, i have some features that need activating and some dashboard features dont show.

    A simple example is the split blog doesnt show upload a picture in the edit or add post even when logged in as the admin… have I missed a step or missed some instruction..

    thanks for your assistance

  173. Richard Bui Says:

    @James T - James, that’s the issue with “splitting” versus doing the Donncha’s domain mapping plugin; which I highly recommend you use instead. But if you are hell bent on doing this method, the steps you need is to do step 30 and on. The site isn’t registering you as the site admin, but once you manually add those entries into the DB, then you’ll be able to access teh Site Admins tab and enable plugins and what not.

  174. James T Says:

    as a follow up I tried to access http://thesplitblog.com/wp-admin/wpmu-options.php

    and it said I dont have permission to access that page as the main admin ?

    I hope you can help .. thanks in advance

  175. James T Says:

    Richard,

    thanks for your reply, I will recheck the step 30 I can access as the main admin I setup on the main site… Donchas plugin I also use and its good but my users can’t setup a subdomain where your method can… i use both…

  176. James T Says:

    I noticed that I made a mistake in some fields. Now that I have corrected it, the admin screen is blank (blog pages are ok) when I remove the a:1:{i:0;s:5:”admin”;} from the site admins duplicate as per step 27 through to 30 then I get the admin panel back again… obviously minus the features… I am going to sleep on it and hopefully see a possible other mistake as I am tired…
    thanks for your help am sure it is a simple mistake on my part to finally get it working fully.

  177. James T Says:

    Richard,

    I have gone over the process and I still get the admin page going blank when I add the admin details in steps 28 to 30… its something simple but I am blind to it… any chance you could look at my DB ?

    thanks any assitance will be appreciated..

Leave a Reply