WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
Can't Access Network Admin Panels After Upgrade (15 posts)

  1. jethin
    Member
    Posted 2 years ago #

    I have a network install with domain mapping I recently tried to update from 3.0.4 to 3.2. The auto update seemed to work OK, and the various sites still seemed to function/map alright, but after upgrading I was unable to access the network/super admin panels. Additionally the domain mapping plug-in options were nowhere to be found. I could access the admin using a domain mapped URL, but not through the "main" blog URL (I think "primary" is the correct term for this?) I have a few guesses what might be going on:

    - We are not using primary domains in the domain mapping plugin, and there is no entry for our primary domain in the plugin. This works fine on 3.0.4. The plugin options are set to "Disable primary domain check." and use "Permanent redirect".

    - Something is wrong with my custom .htaccess rules that are causing this error. Here's what my .htaccess looks like:

    RewriteEngine On
    RewriteBase /

    # Redirect 'www.' requests to canonical non-www domain
    RewriteCond %{HTTP_HOST} ^www.aDomainMappedSite.org$ [NC]
    RewriteRule ^(.*)$ http://aDomainMappedSite.org/$1 [R=301,L]

    RewriteRule ^index\.php$ - [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    - Something is wrong in the domain entries in our apache config or another server interface error.

    I've read a lot in the forums but can't seem to figure this out. If anyone could provide any ideas or testing methods I'd appreciate it. We've rolled back our production environment to 3.0.4 for now. Thanks.

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. Rule #1 of .htaccess - DO NOT put your special changes inside the WordPress section.

    Rule #2 - WordPress goes at the bottom.

    # Redirect 'www.' requests to canonical non-www domain
    RewriteCond %{HTTP_HOST} ^www.aDomainMappedSite.org$ [NC]
    RewriteRule ^(.*)$ http://aDomainMappedSite.org/$1 [R=301,L]
    
    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
  3. jethin
    Member
    Posted 2 years ago #

    OK, thanks for the tips. However, I tried to remove *all* of my custom entries from the .htaccess file and still experienced the same problem. I'm going to try to update again next week, but does anyone have any other suggestions/thoughts on this? I *think* we may be experiencing the infinite loop problem mentioned by others in the forums. If this is the case, can anyone suggest possible fixes?

  4. Before you upgraded your site, was WP set to use http://domain.com or http://www.domain.com?

    And as a side-note: Is this problem happening with your MASTER domain or just a mapped one?

  5. jethin
    Member
    Posted 2 years ago #

    Hi. WP is using http://domain.com. The subdomains are set the same, but include a virtual host alias for the www address. There is no 'www' alias for the main WP site (ie no http://www.domain.com). I wonder if this might be the problem somehow? htaccess is set to remove 'www' from URL on the fly.

    The live sites all mapped/displayed fine after the upgrade. The problem was I couldn't access *any* admin pages through the master domain. I could access admin pages through the subdomains, but had no access to the network pages or the domain mapping plugin settings. I think this may have been because those pages require access through the master domain?

    Thanks for your help.

  6. jethin
    Member
    Posted 2 years ago #

    One other thing: if it's helpful, we are using WP network with subfolders, not subdomains. When I say "subdomain" above I mean a non-primary, network site with a domain mapped domain.

  7. You're jumping back and forth... DO NOT say subdomain unless you mean subdomain.domain.com. The term you want is 'site.'

    So to make sure I get this:

    domain.com/wp-admin doesn't work.
    domain.com/site2/wp-admin doesn't work.
    seconddomain.com/wp-admin (which points to domain.com/site3/wp-admin) doesn't work.

    Is that right?

  8. jethin
    Member
    Posted 2 years ago #

    OK, sorry, terminology is not my strong point. Here's the lowdown (#1 is the main problem):

    domain.com/wp-admin - admin doesn't work/load . live site domain.com displays.

    seconddomain.com/wp-admin (which points to domain.com/site3/wp-admin) - admin works except for network/super admin/domain mapping plugin pages/options. domain.com/site3/wp-admin was not tested and my guess is that it wouldn't have worked/loaded, as it uses the master domain.

    domain.com/site2/wp-admin I don't believe this URL was tested. My guess is that it would have been the same as above.

  9. jethin
    Member
    Posted 2 years ago #

    I can't try that right now -- we've rolled back to 3.0.4 until we can try to upgrade again next week. However, there's no v-host entry for the 'www' version of our master domain so Apache shouldn't resolve it. I'm pretty sure I tried to access the /network/ dir minus the 'www' and the browser hung up, just like all of the admin pages beneath the master domain.

    Perhaps the simplest way I can say it: Our upgrade seemed to work, but we have no access to 1) any of the super admin options in non-master domain site admins nor 2) any admin pages beneath the master domain, which exists only at (no 'www') domain.com.

    So perhaps WP admin backend is not recognizing our master domain at all? Or maybe there's a check for a 'www' master domain somewhere that is preventing proper authentication of master domain and/or granting of super admin privileges? Perhaps this is somehow related to a no-www master domain set up?

  10. jethin
    Member
    Posted 2 years ago #

    PS: if it's helpful, http://www.domain.com/wp-admin/network yields "Server Not Found" error as expected on current, pre-upgrade 3.0.4 production site.

  11. IIRC, normally that's a case of you having a miss-match of www and non www domain entries in your database, which is why I asked.

    I have a non-www domain setup without issues, but it's always been non-www across the board.

  12. jethin
    Member
    Posted 2 years ago #

    DB tables wp_site and wp_sitemeta both contain the non-www master domain URL. But I think we're on the right track here. I think it's something with domain configuration and/or 'www' domain check in the admin somewhere. One other possibility: we don't have an entry for the master domain in the domain mapping plug-in. (As the master domain it shouldn't need to be mapped, right?)

  13. Correct, do not map the master!

  14. jethin
    Member
    Posted 2 years ago #

    FWIW, I wasn't able to resolve this issue. I eventually installed a fresh WP and ported/recreated our 8 network sites to it. This was not an enjoyable task. In the end I think the problem may have had something to do upgrading our db from mysql 4 -> 5, but I really can't say for sure. No v-host settings were changed during the process so I don't think the error was on the server side.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic