• Resolved KalleL

    (@kallel)


    Is it possible to run the main site as admin.mydomain.com but adding new sites as xxxxx.mydomain.com in a (subdomain) multisite installation?

    We are currently running another website at mydomain.com (not wordpress) and we want our users to be able to create their own blogs with web addresses like xxxxx.mydomain.com

    The main site for the wordpress installation could for example be admin.mydomain.com but we do not want blogs with web addresses like xxxxx.admin.mydomain.com

    If this is possible, what do I need to change?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Is it possible to run the main site as admin.mydomain.com but adding new sites as xxxxx.mydomain.com in a (subdomain) multisite installation?

    No. You MIGHT might might be able to map xxx.admin.mydomain.com to xxx.mydomain.com, btu that’s not how WP works in general, so you’re in the weeds.

    Thread Starter KalleL

    (@kallel)

    I do not want to map xxx.admin.mydomain.com to xxx.mydomain.com

    I want to run the main network site at admin.mydomain.com but when creating new blogs I want the web address to be site1.mydomain.com, site2.mydomain.com and so on.

    The problem is that WordPress by default adds admin.mydomain.com when creating a new blog so the address becomes site1.admin.mydomain.com

    I want to change this behaviour so WordPress only uses mydomain.com when creating new blogs so the address for example becomes site1.mydomain.com

    There must be a lot of sites that need this functionality since a lot of sites do not run WordPress at their parent domain, i.e. mydomain.com but what their user blogs at addresses like site1.mydomain.com, site2.mydomain.com and so on.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I want to run the main network site at admin.mydomain.com but when creating new blogs I want the web address to be site1.mydomain.com, site2.mydomain.com and so on.

    Right, you CANNOT do that ??

    That’s what I’m saying, it doesn’t work. So if you want the same effect, try mapping.

    Thread Starter KalleL

    (@kallel)

    That is not correct, YOU CAN DO IT, and I just did it ??

    It is possible to setup a multi site with that kind of configuration.
    You only need to change three PHP files.

    Very easy to do when you know how to do it.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You only need to change three PHP files.

    If you just edited core files, you’re doin’ it wrong.

    What did you do?

    Thread Starter KalleL

    (@kallel)

    When using a network domain like https://www.mydomain.com, WordPress is configured as default to exclude www when adding new blogs. I just changed www to admin in these three core files.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I just changed www to admin in these three core files.

    Which three? (I’m honestly curious to know.)

    And by the way, that’s exactly what I meant by ‘doin’ it wrong’ – Those files will be overwritten in upgrades. ?? The ‘right’ way would be a plugin or a function to filter/change that. If it’s really just those three files, it may be possible to plugin that in.

    Thread Starter KalleL

    (@kallel)

    You need to change “www” to whatever subdomain you are runnning your network site on, in these three files:

    /wp-signup.php
    /wp-admin/network/site-new.php
    /wp-includes/ms-functions.php

    You also need to add the following to your wp-config.php file:

    define(‘COOKIE_DOMAIN’, ‘yourdomain.com’);

    If you have the time and knowledge to create a plug-in you are more then welcome to do so.

    I am a little bit surprised that this functionality is not included in WordPress as a default option when running the multi site setup.

    Thread Starter KalleL

    (@kallel)

    I can confirm that this is also possible to do in WordPress 3.3

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Running main site as admin.mydomain.com but adding new sites as xxx.mydomain.com’ is closed to new replies.