WordPress.org

Ready to get started?Download WordPress

Forums

Multiple sites, same content, slight change with graphic (9 posts)

  1. 3@thr33.info
    Member
    Posted 5 years ago #

    Sorry if this is redundant to another topic. I searched but did not find one.

    Here is my situation: Need multiple sites where the content - layout - etc - is all the same. The difference is a simple header graphic. This allows the same information across the board but each site to be for a lack of a better term "co-branded".

    Example:
    User A is from company 1. They log in and see the site and the header graphic is a dog.
    User B is from company 2. They log in and see the site and the header graphic is a cat.
    The content for user 1 and 2 is identical.

    If this is a no brainer - I apologize in advance for my ignorance. All help or guidance is greatly appreciated.

  2. SimonJ
    Member
    Posted 5 years ago #

    Do you mean that when user A write a post on his site, this post will also be displayed in the user B site ?

    Do they share the same wordpress installation ?

    S.

  3. reflexionstudios
    Member
    Posted 5 years ago #

    Case A:
    Are your 2 clients on 2 different domains, or the same? If you're referring to just 1 domain I suppose you can have 1 database. If you mean there are 2 different domains, I would make an individual database for each.

    If the content is exactly the same, setup both wp-config.php files to connect to the same database (be extremely cautious doing this, however, because you may run into conflicting problems down the road). Then duplicate the current theme folder, rename it, make the necessary change(s), and apply it to the desired domain.

    Case B:
    Now, if you mean that there is just 1 domain with multiple users, and when a certain user logs in and sees a different logo, it's just a simple php if...else situation.

    Bare-bones example:

    if ($user == 'company1') {
         echo '<img src="dog.jpg" />';
    } else if ($user == 'company2') {
         echo '<img src="cat.jpg" />';
    } else {
         echo '<img src="default.jpg" />';
    } //end if
  4. SimonJ
    Member
    Posted 5 years ago #

    reflexionstudios wrote : "If you're referring to just 1 domain I suppose you can have 1 database (...)If the content is exactly the same, setup both wp-config.php files to connect to the same database"

    Hum... i don't know if I understand what you mean... But if you install two wordpress on the same domain in two different folder (you don't have the choice to do so), let's say domain.com/wp1 and domain.com/wp2, it will be impossible to share the same database for both installation... (I don't mean with different prefix)

    Simply think about the blog adress url in wp-options, the permalinks, etc etc.

    S.

  5. reflexionstudios
    Member
    Posted 5 years ago #

    You can have 2 installations of wordpress on the same server, and they can both pull content from the same database.

    yourdomain.com/wp1 --\
                          -- common db
    yourdomain.com/wp2 --/

    That's my understanding, anyway.

  6. 3@thr33.info
    Member
    Posted 5 years ago #

    Currently they are on separate sub-domains and separate installations. The content posts - pages - categories - tags - template are the same. Currently what is different is the header graphic - comments - and some other static ad graphics. I apologize that I did not think of this in my original post.

    I guess what I am trying to accomplish is when a page, post, category, etc... is added to one that it is added to many. Also maintenance and plug-ins. Is this possible?

    Again thank you.

  7. 3@thr33.info
    Member
    Posted 5 years ago #

    And one more thing - that when user 1 logs in they see site 1 graphic and user 2 sees user 2 graphic.

    Hope this makes sense.

  8. SimonJ
    Member
    Posted 5 years ago #

    3@thr33.info wrote : Currently they are on separate sub-domains and separate installations. (...) I guess what I am trying to accomplish is when a page, post, category, etc... is added to one that it is added to many. Also maintenance and plug-ins. Is this possible?

    As far as I know, it's not possible.

    reflexionstudios wrote : You can have 2 installations of wordpress on the same server, and they can both pull content from the same database.

    Well. I don't thnk so. You can use one database with different prefix for tables names (wich is, in fact, pretty much the same than having two database...)... But using strictly the same database for two installation doesn't seems possible to me.

    One simple example : What will you do with the "siteurl" and "home" in the wp_options table?? If you have two installation, it means that you have two different url. ( /wpA and /wpB ) How will you navigate in the /wpB installation if the siteurl (wich is used for permalinks, category links, admin links, etc.) is /wpA in wp_options ???

    Maybe I miss something... ?

    S.

  9. reflexionstudios
    Member
    Posted 5 years ago #

    SimonJ - That's a good point, you may very well be right. I'm not sure.

    3@thr33.info - Despite the fact that pages and posts are the same, if the comments are different I would think you would need 2 separate databases (at at minimum 2 installations with different table prefixes).

Topic Closed

This topic has been closed to new replies.

About this Topic