Network admin stuck in redirect loop

I recently mapped my primary site to a new domain. However, upon doing so, the network admin became inaccessible. I get a redirect loop when trying to access. I have seen a similar issue described here – – but, unfortunately, setting up the site from scratch isn't really an option for us at this point. Any ideas for how we might resolve?

FWIW, I have already commented out these fields from wp-config.php:

//	define('PATH_CURRENT_SITE', '/');
//	define('SITE_ID_CURRENT_SITE', 1);
//	define('BLOG_ID_CURRENT_SITE', 1);
//	define( 'DOMAIN_CURRENT_SITE', '' );
  • Davis Shaver

    So I've identified a potential solution, but I'm interested in your take on it. In core, I modified /wp-admin/network/admin.php to comment out lines 18 and 19 (below). Am I doing something dangerous here or is this okay?

    // $redirect_network_admin_request = ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) );
    // $redirect_network_admin_request = apply_filters( 'redirect_network_admin_request', $redirect_network_admin_request );
  • Davis Shaver

    This is a subdirectory install. Here is WordPress portion of .htaccess (also have an access protection portion, but that shouldn't affect this situation).

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [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).*) wp/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]
    RewriteRule . index.php [L]
    # END WordPress

    No SSL certificates are installed. Using the Domain Mapping plugin, I had tried to map the original domain to a new .com. As mentioned in my second message, I found a hack in /wp-admin/network/admin.php that mitigates this issue. Thanks for any further advisement you can provide! I really appreciate the help.

  • Jack Kitterhing

    Hi there @Davis Shaver

    I hope you are well today, that all looks good, I'm going to need to take a further look at this.

    Can you please send in the following?

    - In the subject field add "Attn: Jack Kitterhing"
    - Link back to this thread
    - Include admin/network access
    - Include FTP
    - Include any relevant URLS for your site
    - Include cPanel access if possible (need to check the database)

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    Thank you!

    Kind Regards

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.