• I was reading through the documentation for WordPress Multisite, and came across the point where it states that WordPress MUST be installed in the root directory if you are using sub-domains.

    Here’s my situation: I’m working at the United Nations International School in Hanoi, Vietnam. Our main site is http://www.unishanoi.org, which is not a WordPress Site and is hosted by FinalSite. I’ve been asked to set up a number of additional, semi-independent sites using subdomains, such as tech.unishanoi.org, apacvolleyball.unishanoi.org, etc. I’ve been creating these as single-site WP installations, hosted at Dreamhost. I’d like to convert them over to Multisite now.

    I can install WordPress in the root folder at Dreamhost, but I can’t simply go to that site because the A record is pointing to Finalsite. Is there any way around this?

Viewing 10 replies - 1 through 10 (of 10 total)
  • I tried it, and it seems to work OK. I suggest you try it too.

    Because I tried it briefly on a live site, and my experiment temporarily broke its normal URL, I quickly restored the settings so I can’t show you it working. Also, I didn’t test it very much. You might discover a problem that I didn’t notice.

    I have a non-WordPress site at (say) example.com with WordPress multisite installed in a subdirectory (say) public_html/haddock/. A separate domain (say) foobar.com is one of the WordPress multisite sites.

    I changed the settings, so that the WordPress multisite site was temporarily at foobar.example.com instead of foobar.com. Nothing bad happened, as far as I could tell.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Yes, but it’s weird…

    Install in wp.yourdomain.com as a subfolder install so you get wp.domain.com/tech and so on.

    Use domain mapping to map tech.domain.com to wp.domain.com/tech

    That should work.

    I didn’t find it weird 😉

    And I didn’t use domain mapping, or at least, I don’t think I did. What is domain mapping?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    http://wordpress.org/plugins/wordpress-mu-domain-mapping/

    So the simple example is halfelf.org is actually on tech.ipstenu.org 🙂 I mapped it to halfelf so the subdomain has a REAL domain.

    I don’t use that plugin or any other like it. WordPress seems to be able to do that all by itself.

    Perhaps my case is slightly different. It looks like your primary site is a subdomain, tech.ipstenu.org, but my primary site has a domain of its own, (say) mackerel.org. Could that be why you need a plugin and I don’t?

    In my case the server config points both mackerel.org and foobar.example.com to the directory public_html/haddock/ where WordPress is installed. WordPress resolves mackerel.org and foobar.example.com to different multisite sites. Meanwhile the server config points both example.com and www.example.com to the directory public_html/ so WordPress never sees them.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Rod Whiteley – My primary site is ipstenu.org

    tech.ipstenu.org (go to it, you’ll see what happens) is MAPPED to halfelf.org – Halfelf is the primary domain for that site.

    In my case the server config points both mackerel.org and foobar.example.com to the directory public_html/haddock/ where WordPress is installed.

    Yep, that’s correct and what I did.

    Meanwhile the server config points both example.com and http://www.example.com to the directory public_html/ so WordPress never sees them.

    Again, yes, that’s what you do.

    But how did you tell WORDPRESS that they were separate sites?

    if you did it by editing the site URL in wp-admin, you did it wrong, and you will (sorry) break things later on. That’s why the plugin is there. For WordPress.

    Thread Starter pswanson22

    (@pswanson22)

    Thanks to Ipstenu and Rod for helping with this. I think that using the domain mapping plugin is the way we’re going to go. I set up the main multi-site installation at http://sites.unishanoi.org. I want to create a test site at http://sites.unishanoi.org/testsite, and then map that over to http://testsite.unishanoi.org. In theory, I think that should work.

    I read through a tutorial on the plugin, but I’m confused about a couple of the steps.

    Step 1 – create an Addon Domain or a Parked Domain. The directions say that if you are not using WordPress in the root direction, you need to use an Addon Domain. However, I didn’t see anything in Dreamhost about creating an addon domain, only Parked Domains. So I created a Parked Domain at http://testsite.unishanoi.org. Is there something I’m missing on this?

    Step 2 – The DNS Settings. This step really baffled me. I have the DNS information from DreamHost, but from there the directions don’t seem to apply. They talk about going into the “registrar’s website where the domain was registered” and changing the name servers. We can add A or CNAME records through our ISP, but I’m pretty sure that we don’t want to change the nameservers over at Network Solutions. I’m guessing that would take down all of the other sites that we are running. I didn’t do anything with this step.

    Step 3 – WPMU Domain Mapping Plugin Installation – no trouble.

    Step 4 – Mapping the External Domain to One of Your Child Sites. I entered in the IP address of our main site, http://sites.unishanoi.org in the “Server IP Address” field under Settings–>Domain Mapping. Then I went to the child site, http://sites.unishanoi.org/testsite, and I went to Tools->Domain Mapping and I added a new domain, http://testsite.unishanoi.org and made that the primary domain.

    Finally, I added an A Record to our ISP list that points testsite (.unishanoi.org) over to the same IP address as sites.unishanoi.org (which I got from Dreamhost). Is this the correct record? Should I be using a CNAME record instead, point testsite.unishanoi.org over to sites.unishanoi.org?

    Right now, all I get when I go to http://testsite.unishanoi.org is a Parked Domain marker from Dreamhost. Any suggestions?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    So the deal there is EVERY host is a little different. DreamHost? Use Mirrors 🙂 Have the mapped domain Mirror the main domain of the network. Should work AND that will also cover your DNS settings.

    Basically you add it like a new domain, have it mirror http://sites.unishanoi.org/ and that should be it.

    Thread Starter pswanson22

    (@pswanson22)

    Ipstenu – thanks so much for your help with this – I’m almost there! I was able to map out four of my sites using Mirrors like you suggested. However, now I’m getting a strange sort of bug. I mapped out http://sites.unishanoi.org/apacvolleyball over to http://apacvolleyball.unishanoi.org just like I did the other sites, but for some reason when I go to the that first link, it redirects to http://apacvolleyball.unishanoi.org/apacvolleyball, and I get a 404 error.

    It seems like this might be a bug somewhere in the domain mapping plugin, but I’m wondering if you’ve ever seen something like this before and what you might recommend. Again, thanks for all your help!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Going to apacvolleyball.unishanoi.org works correctly, though, and that’s what we want. No one should go to http://sites.unishanoi.org/apacvolleyball anymore.

    For some reason it’s hanging on to the folder. Do you have apacvolleyball.unishanoi.org set as primary, AND redirecting the login/admin pages to the new domain?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Sub-domains’ is closed to new replies.