Support » Networking WordPress » Modifying wp-config to use Domain Mapping plugin in subdirectory

  • Thanks for your help on my previous question. I have a follow-up.

    I browsed the forums for an answer to my follow-up and got mixed messages. If I understood what I read correctly. I *think* the answer is “yes.”

    I installed a Network at mysite.com/network (all the files are in there). I’m able to create new blogs at mysite.com/network/blog1, blog2, etc.

    I would like to use the WordPress MU Domain Mapping plugin so that I can have, for example, http://www.blog1.com be the URL for what’s currently at mysite.com/network/blog1.

    When I go to the settings page of the plugin, it tells me, of course, that it won’t work because my Network is installed in a subdirectory.

    If I change in my wp-config:


    $base = '/network/';
    define( 'DOMAIN_CURRENT_SITE', 'mysite.com' );
    define( 'PATH_CURRENT_SITE', '/network/' );

    to:


    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'mysite.com/network' );
    define( 'PATH_CURRENT_SITE', '/' );

    then I can access the Domain Mapping settings page without a problem.

    If I change wp-config in this way, and also update .htaccess and the appropriate spots in my database, will my sites be OK and will I be able to use the plugin as I hope to?

    Thanks again for your help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Are you still accessing everything off mysite.com/network?

    Hi Ipstenu,

    I’m sorry, I’m not sure what you’re asking.

    If you mean, do I also want to use a different URL to access mysite.com/network? No.

    (In fact, the blog at /network is basically a dummy blog. The sites at /blog1, /blog2 and the rest are the ones we’ll really use, which is why I wanted URLs for them.)

    If you mean, do I want to move any files related to /network/blog1 elsewhere? No.

    I apologize if those don’t get at what you want. Please let me know what other information you need.

    Thanks.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Nah, I was unclear 🙂

    Is your site installed at domain.com/ or domain.com/network is what I’m trying to sort out.

    Which I think so since you said
    domain.com/network/blog1 == blog1domain.com

    So long as you’re not trying to use domain.com/network/ AND domain.com at the same time, you SHOULD be okay, though it’s what I’d call hella unsupported.

    MultiSite works best when installed in the root of your site.

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    If I change wp-config in this way, and also update .htaccess and the appropriate spots in my database, will my sites be OK and will I be able to use the plugin as I hope to?

    Not if you want to continue making new sites.

    Thanks, Ipstenu and Andrea.

    Ipstenu, I would like to be able to run this out of the site root, but I don’t think it’ll happen because of how the client likes WP sites to be set up. I might lobby a bit more for it, though.

    Andrea, could you explain a little more what I would get myself into?

    Do you mean that I could first create all the sites I need, update my files as I described (and hope I never need more sites), and be OK?

    Do you mean that there are files or settings I would need to change that I didn’t mention?

    Or are you saying this approach just won’t work?

    Given that installing WP to root is likely not an option, would either of you recommend ditching the MultiSite idea and just creating X number of new, regular WP installations that I would need? This would obviously be more time-consuming to maintain, but it seems it would least be more stable.

    Ron Rennick

    (@wpmuguru)

    MultiSite Guru

    Given that installing WP to root is likely not an option, would either of you recommend ditching the MultiSite idea and just creating X number of new, regular WP installations that I would need?

    Yes, that’s the route you should go. The problem with what you are trying to implement is that the path on the mapped domain is / but your WordPress install is in /network/, so a request for the mapped domain never gets to your WordPress install because the webserver loads whatever web content is in the root of your domain.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Modifying wp-config to use Domain Mapping plugin in subdirectory’ is closed to new replies.