The MU forums have moved to WordPress.org

How to create multiple domains within the same WP-MU installation (16 posts)

  1. guarri-man
    Member
    Posted 17 years ago #

    Hi.

    I'm trying to create multiple domains within the same WP-MU installation (v1.1.1).

    I created 'myserver.com' and it works ok: I can login into 'http://myserver.com/wp-admin/', create new posts, etc.

    I can also create new blogs, and did it with 'myserver.com/xxxxxx'. And, following instructions at 'http://mu.wordpress.org/forums/topic.php?id=3275&replies=31':
    - I parked 'mydomain.com' on my server
    - I changed 'myserver.com/xxxxxx' for 'www.mydomain.com' on the Edit Blog Panel ('wpmu-blogs.php?action=editblog&id=2'). I also checked it into mySQL database ('wp_2_options' and 'wp_blogs' tables)

    But when trying to access to 'http://www.mydomain.com' it redirects to 'http://myserver.com/wp-signup.php?new='.

    If I remove 'www' from 'www.mydomain.com' and set 'mydomain.com' into 'wp_2_options' and 'wp_blogs' tables, 'mydomain.com' works. But:

    - if I try to access 'http://mydomain.com/2007/03/09/hello-world/', it redirects to 'http://myserver.com/wp-signup.php?new=2007'
    - if I try to access 'http://mydomain.com/wp-admin/', it redirects to 'http://mydomain.com/wp-login.php?action=auth&redirect_to=%2Fwp-admin%2F' and it won't work with my admin/pass data (no "Error: Incorrect password" message)

    Does anybody know what I am doing wrong?

  2. drmike
    Member
    Posted 17 years ago #

    When you did the Edit Blog Panel stuff, you did it for all of the entries, right?

    Further down in that thread, I also talk about having to change the wp_site table as well. Did you do that?

    Gotta admit that I never tried it with a subdirectory install.

  3. lunabyte
    Member
    Posted 17 years ago #

    Agreed. I've done "something" similar, but the DNS points to the server, and then I made a subdir in the main root, then made a new vhost for it in the apache config file (above the original domain).

  4. guarri-man
    Member
    Posted 17 years ago #

    >>When you did the Edit Blog Panel stuff, you did it for all of the entries, right?

    Yep, I did:
    - URL
    - Siteurl
    - Home
    - Fileupload Url

    In addition, I changed 'wp_blogs':
    - domain = mydomain.com

    This last step was not made before, and it fixes the login problem. I'm still suffering problems with the permalinks: if I try to access 'http://mydomain.com/2007/03/09/hello-world/', it redirects to 'http://myserver.com/wp-signup.php?new=2007'

    >>Further down in that thread, I also talk about having to change the wp_site table as well. Did you do that?

    Yep, I did. I added a new value:
    - id = 2
    - domain = mydomain.com
    - path = /

    >>Gotta admit that I never tried it with a subdirectory install.

    Mmm.. why "a subdirectory install"? My installation is not a *subdirectory* one...

  5. lunabyte
    Member
    Posted 17 years ago #

    You did set the blog in question to a site id of 2, right? It's either in wp_blogs, wp_"id"_settings, or both. Can't remember off the top of my head.

    But the new site id has to be set as well.

  6. guarri-man
    Member
    Posted 17 years ago #

    >>You did set the blog in question to a site id of 2, right? It's either in wp_blogs, wp_"id"_settings, or both. Can't remember off the top of my head.

    In wp_blogs:
    - blog_id = 2
    - site_id = 1
    - domain = mydomain.com
    - path = /

    In wp_2_options:
    - blog_id is set to '0' in all registries (if I cange them to '2', the error continues)

  7. guarri-man
    Member
    Posted 17 years ago #

    If I access to 'http://mydomain.com/blog/2007/03/09/hello-world/' (note the 'blog' within the URL) it works ok.

    But I don't want 'mydomain.com/blog', but 'mydomain.com'. Any suggestion?

  8. lunabyte
    Member
    Posted 17 years ago #

    It's the site_id that has to reference the domain you want to use.

  9. lunabyte
    Member
    Posted 17 years ago #

    For blog_id "1", that "/blog" will always be there by default. You'll have to hack to get it out for the primary blog.

    It's there to make sure subdirectory installs don't "get confused". For a subdomain install, I can't personally see a reason for it. Kind of like the "category/" base that wp automatically sticks in whether or not you like it.

    That one I can see the reasoning for, as it tries to prevent permalink collisions. Like if you had a page names "news" and a category named "news", then which one is wp supposed to serve at domain.tld/news/?

  10. guarri-man
    Member
    Posted 17 years ago #

    Ok. I changed 'wp_blogs':
    - blog_id = 2
    - site_id = 2
    - domain = mydomain.com
    - path = /

    If I've understood, when setting 'site_id=2' I reference to 'mydomain.com' (since within 'wp_site' blog #2 is 'mydomain.com'), right?

    I changed 'wp_2_options':
    - option_name = permalink_structure
    - option_value = /%year%/%monthnum%/%day%/%postname%/

    When trying to access 'http://mydomain.com/2007/03/09/hello-world/' (without 'blog') it doesn't work. With 'blog' works fine.

  11. guarri-man
    Member
    Posted 17 years ago #

    Perhaps did my new blog copy the 'rewrite_rules' field of wp_1_options? It contains several 'blog/foo'...

    How can I avoid it?

  12. kingler
    Member
    Posted 17 years ago #

    Check out the plugin from David Dean.

    http://wpmudevorg.wordpress.com/project/Multi-Site-Manager

  13. ryanfitzer
    Member
    Posted 16 years ago #

    This plugin seems very promising. I'm having some trouble with it though. I updated the wpmu-functions.php. What is the path I need to point the domain to in the "sites" admin when entering in a new domain? I have the new domain pointing to my wpmu install (http://domain.com/wpmu) but I'm a bit confused. Anyone know much about this?

  14. ryanfitzer
    Member
    Posted 16 years ago #

    Still working on this. My setup is running mu 1.2.1 currently. I bought a new domain and pointed it to my mu install. Went to the "Sites" admin page, added that domain (without a path) and assigned a newly created blog to it. When I type in the new domain I get the "No WPMU site defined on this host" page. Any one have any idea how to make this work?

  15. selad
    Member
    Posted 16 years ago #

    It seems that the multi-site -manager (http://wpmudevorg.wordpress.com/project/Multi-Site-Manager) is not creating the wp_sitemeta date for new sites. Some of the options that need to be inserted are list in the step3 function in index-install.php.

    Anyone is using this plugin?

  16. erick_paper
    Member
    Posted 16 years ago #

    There are too many ideas going on in this thread. Is there a step by step guide for people to follow and install ONE wpmu thingie and then run several domains from it?

    Sort of like EE's "Multisite Manager" or the Movable Type multiple blogs possibility: http://snipurl.com/mtmulti2

    Ideally:

    1. I'd also like to configure things in the httpd.conf itself, instead of .htaccess files (much better from a performance perspective because entries are compiled at start time) with a "AllowOverride None".

    2. I'd like to do this with simple WP, so that all plugins will work, not with MU where many of my important plugins don't work (contrary to the promises made on the first page of this site). I'm thinking about Tomskin's post here: http://snipurl.com/wpmulti1

    Thanks for any pointers!

About this Topic

  • Started 17 years ago by guarri-man
  • Latest reply from erick_paper