The MU forums have moved to WordPress.org

Let different domains use the exact same database (7 posts)

  1. modifiedcontent
    Member
    Posted 14 years ago #

    I have a nice working WPMU/Buddypress site with 600+ members.

    I want to create a site for a spinoff project on another domain that should use the same database; the template would remix the content differently.

    I guess I can just use a copy of the php folders with the same database connection settings in the config file, but even if you come in at secondsite.com, all the links will of course move you to firstsite.com, because that's what's in the database.

    Is there a baseurl rewrite trick that can force the system to continue to use 'secondsite.com' instead of switching to 'firstsite.com' if you come in through secondsite.com?

    Perhaps a line in .htaccess?

    Or a catch-all way to define siteurl or whatever template tag as 'secondsite.com' and supersede what's in the database?

  2. modifiedcontent
    Member
    Posted 14 years ago #

    I've tried editing this line in wp-login.php:

    define('DOMAIN_CURRENT_SITE', 'secondsite.com' );

    But then you get a Fatal Error:

    Could Not Find Blog!
    Searched for secondsite.com/ in database_firstsite::wp_blogs table. Is that right?

  3. andrea_r
    Moderator
    Posted 14 years ago #

    No, the trick is to use one of the many plugins out there to do this.

    If you want the spin-off to be just a domain for one blog, get the domain mapping plugin.

    If you want the spin-off to be another WPMU instance with its own sub-blogs, get one of the multi-site plugins.

  4. modifiedcontent
    Member
    Posted 14 years ago #

    Thanks andrea_r!

    Here's a commercial multi-site plugin that looks interesting.

    And here's another one.

    And another one.

    The multi-site plugins look very primitive/experimental... :-|

    And this seems to be the leading domain mapping plugin, although I think I need something beyond domain mapping.

    Any recommendations which one is the most mature/solid?

    Here's another thread about it.

    EDIT: So I would use these plugins in the php folders of mysecondsite.com? Or would everything be done from one installation?

  5. kgraeme
    Member
    Posted 14 years ago #

  6. modifiedcontent
    Member
    Posted 14 years ago #

    Thanks kgraeme.

    Are those the same plugins as the others, but packaged with pdf instructions? Or different plugins alltogether?

  7. andrea_r
    Moderator
    Posted 14 years ago #

    Same, but with really good instructions, and support.

    Edit: kgraeme listed the one at the top of your list, which is ours. It's not experimental at all - works quite nice & stable actually.

    As an example, the wpmututorials blog is really a mapped blog on a WPMU install, and is not the main blog.

    The plugins go in the mu plugins folder on the main site. you could use both and have a mapped blog on a second Site if you wanted.

About this Topic

  • Started 14 years ago by modifiedcontent
  • Latest reply from andrea_r