WordPress.org

Ideas

Unified subdomains and subdirectories

  1. DancingReality
    Member

    12345

    Idea: Remove subdomain versus subdirectory choice from WordPress multisite installation. Allow WordPress to support both types at the same time. Move this choice to be made on a per blog (aka site) basis.

    Details:
    Right now WordPress requires a permanent choice between subdomains and subdirectories, upon multisite installation. However, this choice has important ramifications, that the user may not be aware of. For example, it is my understanding that it is easiest (or only possible) to perform domain mapping with a subdirectory installation. Also, there are many repercussions for search engine optimization, that can be difficult to predict. There is currently no option to change this choice after it is made.

    I see no technical reason why the user should be required to make this choice at all. It seems possible that WordPress could be capable of both types of blogs, on a per blog basis. This would allow greater flexibility on this issue. More importantly, the user would not be locked in for all time to one particular choice.

    For example, it would be possible to have one large site that uses subdirectory blogs for seo reasons, and other sites that use subdomains for top level domain mapping, all with one wordpress installation.

    WordPress could scale to meet the users needs, as they occur.

    Posted: 8 years ago #
  2. Ron Rennick
    MultiSite Guru

    Technically, this can already be done with http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping *if* you chose a subdirectory install and you have wildcard subdomains set up in your DNS and webserver config.

    Any site that you want to run on a subdomain can be domain mapped as a subdomain.

    A related ticket to be looked at in a future release is http://core.trac.wordpress.org/ticket/11796. In one of my comments on the ticket I alluded to eliminating the VHOST constant. The other decision would be whether to include the full functionality in core, make domain mapping a core plugin or leave it as is.

    Posted: 8 years ago #
  3. Anointed
    Inactive

    12345

    @Ron R

    Do you happen to know if there is a good writeup on how to accomplish both subdomain and subdirectory installs on wpmu or 3.0?

    I have a tough scenario that I have been trying to figure out for months.

    scenario: (involves single install of 3.0 with multisites)

    I have a client that has 7 locations and wants a separate site for each location via subdomain using domain mapping.

    i.e.
    arizona.site.com
    california.site.com
    oregon.site.com

    each site would then need to have the ability to assign user sites ( subdirectories ) to each location.

    i.e.
    arizona.site.com/user1/
    arizona.site.com/user2/

    in above example user1, user2, would be separate subdirectory sites as well.

    Where it gets really crazy is arizona.site.com would be domain mapped, as would california and oregon.

    results would end up being
    arizona.com
    california.com
    oregon.com

    then when adding user sites it would then become
    arizona.com/user1/
    arizona.com/user2/
    etc...

    Basically I would need the ability to not have to choose either subdomain or subdirectory, but have the ability to choose either when adding a site. Only super-admin can add subdomain sites, admins can add subdomain sites to their subdirectory sites created by super-admin.

    So when the admin logs into his site at arizona.com (arizona.site.com) and decides to add a new site, it would automatically choose subdirectory, because he is already using a mapped subdomain.

    Meaning, if his site is california.site.com and he adds a user site it would only give him option of subdirectory setup, 'user1'.

    God, I hope that makes sense....

    Posted: 8 years ago #
  4. laofo
    Inactive

    12345

    I agree with DancingReality.

    I install WordPress 3.0 and enable network function (multisite) in Godaddy.First, I choose subdomain model but it can't work. Then, I want to try subdirectory model. But I can't. I have to reinstall it. :(

    One more, I hope WordPress could support multisite Innately. Please don't let us to modify the configuration file. I would like to configure it in the configuration panel if possible.

    Thank for your consideration.

    Posted: 8 years ago #
  5. Javier Oroná
    Member

    I actually think its a veeery interesting idea..

    +1
    Great Idea!

    Posted: 7 years ago #
  6. MarcusPope
    Member

    @anointed (and anyone else looking to do this setup)

    You'll have a hard time getting that setup working with wordpress out of the box. And because it's a single wordpress install you'd need to make the subfolder /user1 unique across all sites. Otherwise arizona.com/user1 would be accessible via california.com. You could get around that with some url rewrite code, which would effectively map arizona.com/user1 to site.com/arizona_user1/ and california.com/user1 to site.com/california_user1/ but that's a bit more work than I think you need.

    Anyway, you can achieve this functionality with my plugin:

    http://wordpress.org/extend/plugins/root-relative-urls/

    Just do a subdirectory install and point all domains to the server. With my plugin you can access the site via an ip address or any subdomain you wish to point to the install, no configuration necessary. Then you just need to create separate sites for each user. But that assumes you're ok with making /userNNN unique across all sites.

    Shoot me an email at me at marcuspope.com if you have any questions about this setup.

    Posted: 6 years ago #
  7. Naveen Ganesan
    Member

    well. i have an exact situtaion as yours.
    Try my idea, hope it ll work for you..
    first of all, you are putting all the files of wordpress in /root/ directory and making it as a site (mu).
    if you need sub directory sites, then add subdirectories manually and then install them on your existing database with some other extensions.
    this one may work if you need only a few sub domain and many sub directories for each sub domain.

    Posted: 6 years ago #
  8. James
    Inactive

    12345

    Anointed,
    What you described makes perfect sense and would take WordPress to another level. For a while, I've been looking for a discussion on this very topic - the idea makes logical sense - allow a subdomain to act as the parent domain to a series of child subdirectories. I could see this configuration being very difficult to manage user capabilities.

    I have multisite rocking on a large subdomain site and it has been a great solution. I only wish I had more time and knowledge to be able to contribute something substantial that would move this forward. I'm looking forward to seeing if this topic catches any steam.

    Posted: 6 years ago #
  9. Ipstenu (Mika Epstein)
    Administrator

    For multisite, you need a MultiNetwork plugin for that. Of which a few exist. It does exactly was Annointed described.

    Posted: 6 years ago #
  10. voopress
    Inactive

    I'm running a 3.5 network site using sub-directories and came across this while looking for exactly this information.

    We also have a requirement where we need to have both and I've been looking around on how to do that.

    My question to those who have done it is this.

    I have my own network and resources so if I have to run separate servers for both that is not a problem. In fact, it might be the smarter thing to do since sub-domain users aren't interested in being part of any main site anyhow whereas sub-directory users do enjoy being part of the main community.

    So, wondering how you have dealt with this. Was it better to do it all on one server or using two separate installs.

    Thanks.

    Posted: 5 years ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    29 Votes
  • Status

    This is plugin territory