• Resolved rphair

    (@rphair)


    I promise I have been over all the instructions for MU and this plugin in detail and followed the instructions to the letter, and followed them rigorously, with a medium understanding of DNS and httpd, but I’ve failed to get domain mapping to work in a very basic test. I believe I must somehow have missed something.

    I have set up two subdirectory sites on our WP Multi-site, and

    http://54.76.48.242/sl
    http://54.76.48.242/st

    and am trying to get the WordPress installations there to appear at these two domains:

    http://sl.cosd.com
    http://st.cosd.com

    I can tell that mapping is working, since browsing to the addresses http://sl.cosd.com and http://st.cosd.com goes to the subdirectory sites respectively, rather than the parent site. BTW we have no “Primary” domain defined in our Domains list since we don’t know which domains will survive as others may be added and removed.

    The domains above have A records that point to our server’s IP address 54.76.48.242, with our httpd.conf currently directing all traffic into our WordPress root:

    <VirtualHost _default_:80>
            DocumentRoot /var/www/html/wpmulti
    </VirtualHost>

    I know mod_rewrite is working since the Permalinks are working on one of our sites. I can see that the URL http://sl.cosd.com/other is redirecting to http://54.76.48.242/sl/other … so mapping is working, just in the opposite direction than the one we had hoped.

    All relevant details I can think of: we are using WP 3.9.1 on an AWS Linux EC2 instance with PHP5.5.13 and Apache 2.4, with all the Multisite and Sunrise defs in our root wp-config.php and the complete mojo from the MU “Network Setup” superseding everything everything in our root .htaccess, and a fresh sunrise.php from the plugin copied into our root wp-content … there is literally nothing else configured here, on a fresh WP installation.

    Please, where could I begin testing to find what may be wrong?

    https://ww.wp.xz.cn/plugins/wordpress-mu-domain-mapping/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter rphair

    (@rphair)

    upon re-reading my post, I’m sorry to have been unclear in saying “all the instructions for MU”… I mean that I have been through the WordPress Codex instructions for Create a Network and our site is confirmed to be working as a WP multisite, subfolder network.

    I should also further clarify that we have the latest version of the WordPress MU Domain Mapping plugin installed (Version 0.5.4.3, that it is network activated, and that there are no other plugins installed on our site.

    I have also seen a comment in this thread: Is there any way to make WPMU work with wordpress installed in a subfolder? which says:

    Multisite will work in subfolders… what will not work in subfolders is the domain mapping plugin. It’s just how domain mapping works.

    I don’t understand the comment above because the plugin page doesn’t indicate any such restriction that I can see.

    In our case, subdomains weren’t our first choice because our main site has, and will have, only an IP address, with no domain to create subdomains of. My problem might appear trivial now, since sl.cosd.com and st.cosd.com are subdomains, but we will eventually be moving the content at these two development sites to two unrelated domain names that are currently hosting live content (so we can’t set them up now).

    Please, in addition to any possible answers to my question above (why won’t this work)… if it’s true that WordPress MU Domain Mapping doesn’t work on subfolder installs, why wouldn’t this be mentioned in the plugin documentation? If this restriction does appear there, could someone please point me to the passage I’ve missed, so I can have some idea on where to go from here?

    Plugin Author Ron Rennick

    (@wpmuguru)

    BTW we have no “Primary” domain defined in our Domains list

    If you are going to run your main network on an IP address you will have to set one of the domains as the primary domain.

    Thread Starter rphair

    (@rphair)

    dear @ron, thank you so much. I have set sl.cosd.com as the primary domain, and now it is serving that subfolder site’s content under that primary domain.

    The other domain, st.cosd.com, still redirects to 54.76.48.242/st without our mapping having any effect.

    What else could I have missed? Do I need to reinstall the site using subdomains instead of subfolders, as suggested in that other thread?

    Thread Starter rphair

    (@rphair)

    FYI I am reinstalling our site now with subdomains, so the links above might not be working for a bit. With no answer to the question above I think it is our only way forward. If that turns out to be the solution I will summarise here.

    Plugin Author Ron Rennick

    (@wpmuguru)

    The other domain, st.cosd.com, still redirects to 54.76.48.242/st without our mapping having any effect.

    That could be your browser following the cached redirect. You would need to clear your browser cache.

    Thread Starter rphair

    (@rphair)

    Reinstalling the site with subdomains didn’t work either. When installing our site as sl.cosd.com, our only option for creating a Site was to set it up as st.sl.cosd.com which we then mapped to st.cosd.com .

    The main site sl.cosd.com then worked as predicted, but the mapped domain st.cosd.com would then redirect to sl.cosd.com/wp-signup.php?new=54.76.48.242 which displays the content Greetings Site Administrator! You are currently allowing β€œnone” registrations. To change or disable registration go to your Options page.

    I appreciate that this plugin is available but I am really frustrated that we can’t find a single example anywhere on the Internet about how this is supposed to be set up for anything other than a “hierarchy” of sites and nested DNS domains. I’ve seen from other postings that people have gotten Domain Mapping to work when the domain mappings were arbitrary… doesn’t wordpress.com itself work this way?

    Please, if I may start this question anew: We are just trying to set up a basic test case with these characteristics:

    1. WordPress is installed on an IP address (since there will be no web site there, and because we don’t want difficulties changing a “primary” site name when we move from development to production).
    2. Then we set up a multisite network on this site, create two Sites on the multisite network, and install the Domain Mapping plugin.
    3. Then we map two development domains (sl.cosd.com and st.cosd.com) to these Sites, and build our sites there.
    4. When done, we map our two production domains to these sites, and fix the links in our content accordingly.

    We don’t know, and don’t really care, whether this is done with a sub-domain or sub-folder installation, as long as we know which one to use and why. We just please need the help of someone familiar with this plugin to please briefly explain how to set up a domain mapping for a new site with the above qualities, since the plugin instructions don’t have this level of detail.

    If there is anything wrong with the premise above, we would really appreciate the help of someone who has some experience with the Domain Mapping plugin to briefly, but accurately, describe the next closest thing that will be possible.

    This would be a common testing & development scenario and I am sure this will benefit many WordPress designers. If we can just be prompted in right direction I will post complete instructions here when we have it working.

    Thread Starter rphair

    (@rphair)

    dear @ron – thanks again for the response, which crossed in while I was editing the last post.

    That could be your browser following the cached redirect. You would need to clear your browser cache.

    I have cleared the cache, which does change the redirect. It now redirects from st.cosd.com (our mapped domain) to st.sl.cosd.com (our subdomain site)… i.e., in the opposite direction that we need it to go.

    I am still hoping to go back to first principles, to see how a site like this should be set up. Our blank site as it exists now is probably set up wrong anyway and I’d happily destroy it in favour of a proper design, whatever the best practice may be for a site with the characteristics described above (1-2-3-4).

    Thread Starter rphair

    (@rphair)

    After a fourth day of trial and error I have found a solution. This will be obvious to people having experience with this plugin and/or Multi-Site networks, but that is exactly why we needed help in the first place.

    The site configuration, as originally described in the first posting, was mostly working. We only needed to visit Network Admin > Sites and Edit each of our subfolder sites to show the Settings tab, then set the Siteurl parameter to our desired URL for each mapped domain. Obviously (?) this needs to be done after the domain mapping is set up, so as not to break the sites.

    Prior to making this change, Siteurl still showed the sub-folder sites in our network. This is why the unmapped domains kept showing up in all our URLs. Our sites are now bouncing merrily along on the domains sl.cosd.com and st.cosd.com.

    Contrary to what @ron said above, we have everything working now without having any Primary domain set. Furthermore, setting a Primary domain in any configuration described above has caused the domain mapping and/or URL resolution on all other sites to break.

    I have created all the major site components so far like Blog entries with pretty permalinks, CMS pages, custom menus, and swapped the Home and Blog pages, and so far it’s all working. We have one or two more plugins to install that will utilise the Multi-Site configuration and if there are any general problems I will post here.

    I am not trying to be either a hero or a fault-finder, but I think this is a case in point that this plugin could use some documentation addressing the above case, and in general illustrating more practical examples and how to achieve them. I’ll be happy to mark this topic as “resolved” if we see any responses to that effect.

    Plugin Author Ron Rennick

    (@wpmuguru)

    WordPress is installed on an IP address (since there will be no web site there, and because we don’t want difficulties changing a “primary” site name when we move from development to production).

    Using an IP address for that reason might seem like a way to make things easier/better. there are probably scenarios where that would be the case but a network using domain mapping is not one of them.

    We only needed to visit Network Admin > Sites and Edit each of our subfolder sites to show the Settings tab, then set the Siteurl parameter to our desired URL for each mapped domain.

    The point of the domain mapping plugin is that you don’t need to edit the site URLs.

    Thread Starter rphair

    (@rphair)

    dear @ron, thanks for your response & I can see what you are saying but I disagree:

    there are probably scenarios where that would be the case but a network using domain mapping is not one of them.

    To test this I momentarily turned off the Domain Mapping plugin and all pages on both sites reverted to their subfolder-based URLs (e.g., clicking our Blog link on the sl.cosd.com site pointed to http://54.76.48.242/sl/blog/ . In light of our earlier discussion, yes I cleared my cache while testing this πŸ™‚ .

    Therefore I believe it must be the Domain Mapping plugin that is correctly rewriting the URLs in this multi-site configuration, so my argument above cannot be so easily thrown out.

    Plugin Author Ron Rennick

    (@wpmuguru)

    @rphair – what I meant was that using an IP address for the staging site is fine in some scenarios.

    If you are going to be using domain mapping then you are creating more work/issues for yourself than you are saving by using the IP address (as an “easy” DB replacement).

    Thread Starter rphair

    (@rphair)

    Thanks @ron, I think we have enough information here to mark this issue as resolved. For our own two- or three-site network I think I am OK with the work/issues, since nobody has suggested any specific way around them so far and the plugin has made our simple site work as planned.

    Once I personally have a better understanding of how WordPress Permalinks work, perhaps we will be able to do the desired thing with some mod_rewrite rules and then we could deactivate the plugin. Even better if the WP development team could make domain mapping part of the mainstream.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘failing basic test under ordinary circumstances’ is closed to new replies.