The MU forums have moved to WordPress.org

Root MU blog on same tier as other blogs? (7 posts)

  1. TumbleN
    Member
    Posted 14 years ago #

    Hi! Just discovered WordPress MU and it is amazing.

    I'm currently having a few troubles figuring out how to get it what I want to do, though:

    Say I have sitex.com. I want to install the main WordPress MU under blogs.sitex.com but I still want the blogs setup as user.sitex.com rather than user.blogs.sitex.com.

    Is there a way to do this without some messy hacks?

    Thank you!

  2. tmoorewp
    Member
    Posted 14 years ago #

    You could install WPMU under blogs.sitex.com and let it generate user blogs as user.blogs.sitex.com. You can then use a domain mapping plugin to get the user.sitex.com to map to user.blogs.sitex.com.

  3. TumbleN
    Member
    Posted 14 years ago #

    Hi, so I've been messing with this for awhile now. Everything is running smoothly on user.blogs.sitex.com, but I still haven't figured out how to map the domain over.

    Can you recommend a domain mapping plugin?

    How does WP MU find the correct blog? Does it simply look at the highest subdomain or does it use the entire url? Is wpmu-settings.php where all of that happens?

    Thanks!
    -Nicky

  4. tmoorewp
    Member
    Posted 14 years ago #

    Here's Donncha's Domain Mapping plugin.

    It works with your DNS. Read through Donncha's readme files and Web site for more info.

  5. TumbleN
    Member
    Posted 14 years ago #

    So, I added the following code to wpmu-settings.php at line 122

    if(!strpos($domain, '.blogs.')){
        $p = explode('.', $domain);
        $domain = $p[0] . '.blogs.' . $p[1] . '.' . $p[2];
    }

    That allows me to go to user.sitex.com and get user.blogs.sitex.com. My 2 current issues are:

    1. All the links on the page are still user.blogs.sitex.com, is there a clean way to fix this?

    2. I'm a bit concerned with messing too much with core wpmu files, but I imagine there isn't a hook for what I'm doing. Is there a way to insert my code there cleanly without making updating later on a pain?

    Thanks again :)
    -Nicky

  6. tmoorewp
    Member
    Posted 14 years ago #

    You shouldn't mess with core files in this case. As I've mentioned, the domain mapping plugin does exactly what you want and will do the URL conversion as needed.

  7. TumbleN
    Member
    Posted 14 years ago #

    Yep, that worked pretty damn good. Will need a bit of tweaking so the new domains are added automatically and users can't add as many as they like but the core of that is just what I needed.

    Thanks tmoore!

    -Nicky

About this Topic