Redirect loop between wp-admin and wp-login
-
When I try to access my dashboard by https://www.mysite.com/wp-admin, it returns this URL https://www.mysite.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.mysite.com%2Fwp-admin%2F&reauth=1 and a 404 error message.
It looks like my site did an automatic WordPress upgrade to 3.9.3 on November 20, which may have caused the problem. I tried to log into the wp-admin page this morning and saw the 404 error message, so I decided to go into my FTP log and manually upgrade to 4.0.1, but that didn’t fix the problem.
I have also tried the following:
? deactivated all plugins
? removed the .htaccess file from the root folder
? renamed my active theme’s folder to see if that was causing the problem
? added this code to my wp-config.php file:
define(‘WP_HOME’,’https://www.mysite.com’);
define(‘WP_SITEURL’,’https://www.mysite.com’);
? fiddled with a bunch of other snippets of code that I don’t remember that I found on some forums where people had the same problemsNone of these have worked. I’ve wasted my day trying to fix this, and I’m at my wits’ end. Does anyone have any suggestions? TIA.
-
If you go in an incognito window (Firefox, Chrome)
then go to mysite.com/wp-login.php
And login does it also cause this loop?Hi, Tim,
Thanks for your response. I tried it in Chrome, and it still has a redirect loop with the incognito window.
I should mention also that I cleared my cookies and cache yesterday before I submitted my original post, too. It did the same in Safari, so I’m thinking that it’s not a browser issue.
Hi Heathie,
I don’t have a solution for you (yet) but I can say that I am experiencing a similar issue if not the very same thing, so you are not alone. I have a multisite where if I try to go to siteurl.com/wp-admin I get the same issue. I see a message that says “file not found”, is this the same as you experience?
I have tried completely downloading a uploading a fresh copy of wordpress and disabled all plugins and themes with no success. At this point I wonder if its the database but I am still working on testing that.
If I get a solution that I think might help you I will let you know for sure.
-Al
althe3rd Per the forum welcome please post your own topic. It’s the best way to get the attention your problem deserves.
Heathie Do you have access to your servers error logs, either through your hosts admin panel, or sometimes available in a folder called logs?
If so does it show any errors?
You mention you disabled the htaccess, was that in the root of your site, do you have a htaccess file in your wp-admin folder?
althe3rd I’ve seen a lot of posts about this issue with multisites, but I’m not running a multisite so those solutions don’t appear to apply to my setup. Good luck!
Tim Nash There is a file in my root folder called error_log. Is that what you’re looking for? It’s a huge file and shows these errors for December 1 (the database error has apparently been a problem for a while):
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
[01-Dec-2014 00:00:30] WordPress database error Duplicate column name 'blog_id' for query ALTER TABLE wp_page_expiry_info ADD blog_id BIGINT NOT NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/page-expiration-robot/expirer.php') [01-Dec-2014 00:00:36] WordPress database error Duplicate column name 'blog_id' for query ALTER TABLE wp_page_expiry_info ADD blog_id BIGINT NOT NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/page-expiration-robot/expirer.php') [01-Dec-2014 00:00:58] WordPress database error Duplicate column name 'blog_id' for query ALTER TABLE wp_page_expiry_info ADD blog_id BIGINT NOT NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/page-expiration-robot/expirer.php') [01-Dec-2014 00:03:18] WordPress database error Duplicate column name 'blog_id' for query ALTER TABLE wp_page_expiry_info ADD blog_id BIGINT NOT NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/page-expiration-robot/expirer.php') [01-Dec-2014 00:03:28] WordPress database error Duplicate column name 'blog_id' for query ALTER TABLE wp_page_expiry_info ADD blog_id BIGINT NOT NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/page-expiration-robot/expirer.php') [01-Dec-2014 00:04:22] WordPress database error Duplicate column name 'blog_id' for query ALTER TABLE wp_page_expiry_info ADD blog_id BIGINT NOT NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/page-expiration-robot/expirer.php') [01-Dec-2014 00:04:36] WordPress database error Duplicate column name 'blog_id' for query ALTER TABLE wp_page_expiry_info ADD blog_id BIGINT NOT NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/page-expiration-robot/expirer.php') [01-Dec-2014 00:30:52] PHP Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52 [01-Dec-2014 00:32:43] PHP Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52 [01-Dec-2014 00:57:40] PHP Fatal error: Call to undefined function add_action() in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php on line 4637 [01-Dec-2014 00:57:56] PHP Fatal error: Call to undefined function add_action() in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php on line 4637 [01-Dec-2014 01:04:33] PHP Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52 [01-Dec-2014 01:04:47] PHP Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52 [01-Dec-2014 01:04:55] PHP Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52 [01-Dec-2014 01:10:28] PHP Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52 [01-Dec-2014 01:11:55] PHP Fatal error: Call to undefined function responsive_in_header() in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 58 [01-Dec-2014 01:12:47] PHP Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52 [01-Dec-2014 01:14:08] PHP Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52 [01-Dec-2014 01:14:31] PHP Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52
So do you think it’s a theme problem?
The htaccess file was in my root, and there’s not one in my wp-admin folder.
Thanks for your help!
I enabled debugging in my wp-config file and tried to get to the wp-admin page again. This error is only displayed once I am redirected to https://www.strikecampfitness.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.strikecampfitness.com%2Fwp-admin%2F&reauth=1; it does not appear on any other pages on my site:
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
Notice: Trying to get property of non-object in /home/hepheath/public_html/www.strikecampfitness.com/wp-content/themes/kickbox/header.php on line 52
This is the code in the header file that I think is returning the error message, but I don’t know what is wrong with it or if it is responsible for the redirect issue:
<?php wp_nav_menu(array( 'container' => '', 'theme_location' => 'header-menu', 'menu'=> get_post_meta( $post->ID, 'MenuName', true)) ); ?>
I assume you have a theme called kickbox active?
Temporarily rename your theme folder and then try to loginBefore doing so backup so you can go to the backup if it goes wrong.
Yes, you’re correct…kickbox is the active theme. I renamed the theme folder, but it did the same redirect (page came up blank, but URL was still https://www.strikecampfitness.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.strikecampfitness.com%2Fwp-admin%2F&reauth=1).
Hello everyone.
I am a professional developer. I have the same problem since the last days (auto update wp> 4.01). redirection loop to conection admin, and the disappearance of wp here: /
The version is an old version 3.x, which functioned perfectly (in version 4.0) ntil I update 4.01.
I tried everything, replacement of the default theme, htacces of default, configuration etc. Nothing there.
I would inform you possibly aware of the following event.Also have the same issue.
Upgraded from 4.0.0 to 4.0.1 and have a redirect loop when navigating to the admin site.
Tried disabling plugins and the theme LT/.
I wonder if it has to do with my host. I just deleted everything off the server and reuploaded WP 4.0.1 without my custom theme and previously installed plugins…just the wp-config file. Site is blank, wp-login still has a redirect loop. Gonna downgrade for now…can’t run a business without a website!
Oh, this can’t be good…I am aware of the security issues, but I downgraded to 3.8.1 (the most recent release before I had this problem). Still a blank page, and still has a redirect loop on the wp-login page! I’m at a complete loss here…any ideas?
Okay, I spent WAY too much time and upgraded WordPress step-by-step, so I am back at 4.0.1 and still experiencing the same redirect issue. With debugging enabled, here are the error messages I am now getting:
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php on line 3497 Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php on line 3547 Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php on line 3547 Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php on line 3378 Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php on line 3378 Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php on line 3378 Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php on line 3378 Warning: Cannot modify header information - headers already sent by (output started at /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/functions.php:3497) in /home/hepheath/public_html/www.strikecampfitness.com/wp-includes/pluggable.php on line 1178
I believe this might have something to do with my theme. I just updated my parent theme, and none of those error messages changed. How do I change my active theme via FTP?
Now I’m thinking it’s a database problem. Great.
I backed up my previous install to a different folder and reuploaded WordPress from scratch (without my plugins or themes or customized files). I entered my database/user information when WordPress prompted me to do so, and then I got this message before I got the error about the redirect loop on wp-login:
You appear to have already installed WordPress. To reinstall please clear your old database tables first.
So basically, I’m going to lose all of my data if I clear my tables, right? There has to be better way!
This is infuriating! I made my database table prefix “wp2014_” to force it to use new tables, and it let me run a clean install. HOWEVER, I’m still getting this URL when I attempt to access wp-admin: https://www.strikecampfitness.com/wp-login.php/?redirect_to=http%3A%2F%2Fwww.strikecampfitness.com%2Fwp-admin%2Findex.php&reauth=1
Any ideas??
- The topic ‘Redirect loop between wp-admin and wp-login’ is closed to new replies.