WordPress.org

Ready to get started?Download WordPress

Forums

How do I share a folder between three subdomains? (6 posts)

  1. sleeplessinDC
    Member
    Posted 1 year ago #

    I have three subdomain WordPress sites that need to have separate logons and maintenance teams. One of the subdomain sites has an includes folder in the child theme that I'd like the other two sites to share

    How do I set up a symbolic link for this? Can the includes folder stay where it is or should the includes folder be moved out of the one subdomain and into the root domain so they all point to that folder?

    I am using an Apache server running Linux and PHP5. Thanks.

  2. Andrew Bartel
    Member
    Posted 1 year ago #

    Use a multisite installation and MU Plugins.

  3. sleeplessinDC
    Member
    Posted 1 year ago #

    I'm not sure I can use multisite installation. I have four existing URLs:
    http://www.sitename.org
    sub1.sitename.org
    sub2.sitename.org
    sub3.sitename.org

    WordPress is installed into each subdomain so those sites can have separate logons, separate databases, and in some cases, different plugins. They will all use the same theme but they have a different theme child (different functions, css, etc.).

    I'd like all four to use a common includes folder. Is it at all possible to set up a symbolic link to achieve this without having to buy 3 more domain names and messing up our databases?

    From what I've read, multisites need to be either four different domain names
    http://www.sitename.org
    http://www.sitename2.org
    http://www.sitename3.org
    http://www.sitename4.org

    or the same domain name but different folders:
    http://www.sitename.org/site1
    http://www.sitename.org/site2
    http://www.sitename.org/site3
    http://www.sitename.org/site4

  4. beattle55
    Member
    Posted 1 year ago #

    Or

    sub1.sitename.org
    sub2.sitename.org
    sub3.sitename.org

    That is how mine is set up.

  5. sleeplessinDC
    Member
    Posted 1 year ago #

    @beattle55 That is how my site is set up. My question is about how to share a common /includes/ folder among the three sites?

    I have one /includes/ folder in the theme in sub1 right now. Do I have to duplicate it to put it in sub2 and sub3 (which I don't want to have to maintain 3 copies of the same file), or can I somehow set up a symbolic link for sub2 and sub3 to be able to share files in the /includes/ folder in sub1?

  6. beattle55
    Member
    Posted 1 year ago #

    I guess I wasn't clear with what I was meaning. I have WordPress multisite installed in: sitename.org

    The subdomains are all "virtual" and created in the WordPress Multisite Admin interface....they are not created as "real" subdomains. They all share the same WP core files, and they can all have different themes and different plugins activated.

    Additional new subdomain sites can be added at any time through the main domain admin panel, and updates for all sites are done through the main domain admin panel as well.

Topic Closed

This topic has been closed to new replies.

About this Topic