Support » Networking WordPress » WordPress 4.7.2 update on multisite causes wp-admin redirect loop

  • darkhousedevelopment


    I have a website running multisite using a subdirectory setup. I have just tried updating my site to 4.7.2 and the update goes through and no errors happen during the installation, but then after the install is finished I am redirected to /wp-admin/network/about.php?updated which returns a 404 page. So then I try to go back to /wp-admin/ and I get a redirect loop error.

    I have looked through at least 40 different articles, forums, and websites about WordPress multisite wp-admin redirect loop issues. I have tried everything I can possibly find to fix this issue, but nothing has worked. The main site works perfectly fine, but wp-admin is completely unaccessible.

    Here are the things I have tried so far:

    1. I tried clearing my cache and cookies multiple times, and the site is not using any caching plugins
    2. I renamed my plugins folder to plugins.deactivate
    3. Just to be extra thorough I also updated active_plugins field in the wp_options table to a:0:{}
    4. I tried removing multisite definitions from my wp-config.php file, but when that had no effect I put them back
    5. I confirmed my .htaccess file matches the one listed here for 3.5+ multisite –
    6. I also tried switching it to the old version, just in case, but that did nothing so I switched it back.
    7. I found a forum saying that they fixed the issue by commenting out a redirect at the bottom of /wp-admin/network/admin.php so I tried that but it did nothing so I uncommented it back to normal.

    Here is my .htaccess file:

    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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    And here is my wp-config.php file:

     * The base configuration for WordPress
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     * This file contains the following configurations:
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     * @link
     * @package WordPress
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME, 'DBNAME');
    /** MySQL database username */
    define('DB_USER', 'DBUSERNAME');
    /** MySQL database password */
    define('DB_PASSWORD', 'DBPASSWORD');
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
     * Authentication Unique Keys and Salts.
     * Change these to different unique phrases!
     * You can generate these using the {@link secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     * @since 2.6.0
    define('AUTH_KEY',         '6YuB7pAuURnDjyFUcb3Q3rVrWiNk6K872AyD1pP2t09WPxY09Z3BVxaSFWmQxYcM');
    define('SECURE_AUTH_KEY',  'FIoVpmtRhYJNWrE2G689bp2GinApBgY47OVVxrZiS4Y134lqLYIbvf57PIqSoQTX');
    define('LOGGED_IN_KEY',    '8zC1jLLeAe2DH1E4k7KwXpLlkKaZEzVkDqOjx4z6csRERQhsqYvdQsroXbqvR7MG');
    define('NONCE_KEY',        'Vcz1A0I1e37bksIaA5wFWQBHvJtt6zRwzmQDAlwUOW2Eo21Mn23tUldujrbwtv6s');
    define('AUTH_SALT',        'ng5aCZQQ1bHQ1YkO1QlZwdcLp38yXAHssnEtofvqCL67PeVQUiFNh7Ns1UkSjMai');
    define('SECURE_AUTH_SALT', 'ZP0xk8ldQc0OftLgpADR4toNPCN4sLEFuSTaRWTmGBu8dyEs1yXfwEq8Gag00AWi');
    define('LOGGED_IN_SALT',   'VKmGsDjfILr5HeEXJuL7WlQ0UUcRvZQrT5Z47cR7mied28FvREetf0pvxwSE8M7l');
    define('NONCE_SALT',       'JexGduB5BSCxcgNbTYEsfaKudzbcK9PzFaRgkMZUUlFy4GoQjUSx1i2MEcK8Byfv');
     * Other customizations.
     * Turn off automatic updates since these are managed upstream.
     * WordPress Database Table prefix.
     * You can have multiple installations in one database if you give each
     * a unique prefix. Only numbers, letters, and underscores please!
    $table_prefix  = 'kl9t_';
     * For developers: WordPress debugging mode.
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     * For information on other constants that can be used for debugging,
     * visit the Codex.
     * @link
    define('WP_DEBUG', false);
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    /* That's all, stop editing! Happy blogging. */
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
Viewing 5 replies - 16 through 20 (of 20 total)
  • I had a similar issue immed after installing a plugin, fixed by rolling it back. Thank you all!

    I’m also having this problem and can’t seem to fix it. Have also read through a lot of articles and forum posts etc. What plugin(s) caused this for you?

    Hi! I might be posting this issue in the wrong forum so I apologize in advance. I’m having problems with permalinks in my WordPress site ever since I changed the name of my site, Creative to Creative All of the permalinks have been changed on the site and in my Godaddy hosting files, but when I sign into my website and move from my Blog page back to the Home page is comes up with my old domain name and a completely different site that has nothing to do with my content. I have contacted Godaddy but they said to change the links in the FTP/wp…, which I have done but this problem keeps occurring. Any ideas!! Thanks! Di

    Just had this same problem. Tried all the same things as the original poster. Watched the error logs religiously while trying to log in and spotted a peculiar error:

    [11-Oct-2017 23:48:37 UTC] WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES (9, 'session_tokens', '(serialized array of private data)') made by wp_signon, wp_set_auth_cookie, WP_Session_Tokens->create, WP_Session_Tokens->update, WP_User_Meta_Session_Tokens->update_session, WP_User_Meta_Session_Tokens->update_sessions, update_user_meta, update_metadata, add_metadata

    This led me to have a look at the users table. I noticed that one of the users had an ID of zero (0). This struck me as odd. I deleted that user but continued to see the error, so, instead of skimming it I actually read it and noticed that the table having the issue was the wp_usermeta table, not the wp_users table. That table also had a row with an ID of zero.

    Bottom line: if you are experiencing this problem it is very likely that the structure of the users and usermeta tables are incorrect. Specifically, both tables need AUTO_INCREMENT set on their ID columns.

    If, upon trying to add the AUTO_INCREMENT option to the column you get an error about duplicate indexes, check to make sure you don’t have any rows already in the table where the ID (the column you are trying to modify) is set to zero. If so, delete that row and try the MySQL command again.

    Happy trails to you… till we meet again!

    • This reply was modified 1 year, 1 month ago by  tedmaster. Reason: fixed code formatting for clearer reading


    @darkhousedevelopment – thanks a lot,
    mine was a permission error too

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘WordPress 4.7.2 update on multisite causes wp-admin redirect loop’ is closed to new replies.