WordPress.org

Ready to get started?Download WordPress

Forums

Log in or working links, I can't get both (6 posts)

  1. tone_milazzo
    Member
    Posted 2 years ago #

    Hello Everyone!

    I'm having to edit my wp_config.php every time I want maintain my site since I added multi-site and I'm out of ideas:

    site-one.com is the original site-two.com is the added.

    When define( 'SUBDOMAIN_INSTALL', true );
    I can't log in to site-two.com or access it's dash with my superuser.
    Internal links work fine.

    When define( 'SUBDOMAIN_INSTALL', false );
    I can log into site-two.com and access it's dash
    Internal links redirect to site-one.com.

    I followed the instructions on http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/comment-page-10/#comments
    With the following exceptions:
    1) I dropped the WordPress MU Domain Mapping plugin in with the rest of the plugins
    2) I didn't put the domain_mapping.php file in the mu-plugins folder since it was causing a conflict with the one in the plugin
    3) I don't see the settings for Step 4 and I'm not sure if this applies to the latest version.

    /** allowing multiple sites **/
    define( 'WP_SITEURL', 'http://www.site-two.com');
    define( 'WP_HOME', 'http://www.site-two.com');

    define( 'SUNRISE', 'on' );
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'site-one.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    and

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

  2. Remove this

    /** allowing multiple sites **/
    define( 'WP_SITEURL', 'http://www.site-two.com');
    define( 'WP_HOME', 'http://www.site-two.com');
  3. tone_milazzo
    Member
    Posted 2 years ago #

    Thanks for the suggestion, Mika, but the behaviors continue as before.

  4. 1) I dropped the WordPress MU Domain Mapping plugin in with the rest of the plugins

    Did you network activate it?

  5. tone_milazzo
    Member
    Posted 2 years ago #

    I didn't.
    Now I have. And how I can't log into the site-two.com dasboard

  6. tone_milazzo
    Member
    Posted 2 years ago #

    After activating and deactivating the MY Domain Mapping plugin a few times I can now get to the site-two.com dashboard. The MU plugin is active on network and both sites.

    I did some more looking around on this message board and found this thread:
    https://wordpress.org/support/topic/cant-login-after-network-subdomain-install-with-31?replies=5

    So I took a look at my wp_blogs and wp_site tables. wp_blogs had both sites with the same site-ID and wp_sites was missing a reference to site-two.com. I fixed those errors and as long as define( 'SUBDOMAIN_INSTALL', true ) everything mostly works.

    Now I can only log out of the site-two.com site or dashboard. I can't log out from the site-one or network dashboard. But I can live with this, at least now I can logout without having to ssh in and edit the wp-config.php

Topic Closed

This topic has been closed to new replies.

About this Topic