Admin redirect loop caused by Hummingbird
-
My admin login page is stuck in a redirect loop after I installed the hummingbird plugin. I then uninstalled the plugin and noticed that it is still rewriting to my htaccess file.
I tried removing the file, cleaning up the hummingbird text and changing the permission to read-only but the file keeps being created and rewritten.
Any help or advice would be greatly appreciated!
The page I need help with: [log in to see the link]
-
Hi @muchris
Sorry to hear you are having this issue,
Hummingbird will only write in htaccess to add the browser cache or Gzip if both modules are enabled in the plugin, however, those shouldn’t create any redirect.
Could you copy and paste the code that keeps being added after removing the plugin?
Best Regards
Patrick FreitasHi Patrick,
Thanks for getting back to me. I am not sure why but this started when I installed the plugin and since I can’t access the admin I tried to remove it manually by delete the files via ftp but it’s still happening.
Here is the code that keeps getting added after I remove it from the .htaccess:
# BEGIN WP-HUMMINGBIRD-CACHING # The directives (lines) between "BEGIN WP-HUMMINGBIRD-CACHING" and "END WP-HUMMINGBIRD-CACHING" are # dynamically generated, and should only be modified via WordPress filters. # Any changes to the directives between these markers will be overwritten. <IfModule mod_expires.c> ExpiresActive On ExpiresDefault A0 <FilesMatch "\.(txt|xml|js)$"> ExpiresDefault A31536000 </FilesMatch> <FilesMatch "\.(css)$"> ExpiresDefault A31536000 </FilesMatch> <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$"> ExpiresDefault A31536000 </FilesMatch> <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$"> ExpiresDefault A31536000 </FilesMatch> </IfModule> <IfModule mod_headers.c> <FilesMatch "\.(txt|xml|js)$"> Header set Cache-Control "max-age=31536000" </FilesMatch> <FilesMatch "\.(css)$"> Header set Cache-Control "max-age=31536000" </FilesMatch> <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$"> Header set Cache-Control "max-age=31536000" </FilesMatch> <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$"> Header set Cache-Control "max-age=31536000" </FilesMatch> </IfModule> # END WP-HUMMINGBIRD-CACHINGHi @muchris
Thank you for the code
Yes, it is related to browser caching, shouldn’t cause a redirect issue but I still wonder why the plugin is adding the code if is disabled, could you verify:
– Check on wp-config.php if define(‘wp_cache’, true) still exist, if so, remove it.
– Go to the wp-content folder and verify if the advanced-cache.php file is there, if so, also remove it
– Confirm if the hummingbird folder still exists on the wp-content > plugins folder, in case so, try to remove the folder.In case the issue persists, I suggest taking those troubleshooting tests: https://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/ to find why it is happening.
Let us know the result you got.
Best Regards
Patrick FreitasHi Patrick,
Yes, I just confirmed that all those things were removed and cleared. And I also went through many articles online including the one you sent! Unfortunately, I am facing the same issues. This is why I wanted to have a clean .htaccess to make sure I rule out the hummingbird plugin.
From your article, I did everything except the htaccess file which I am having issues with. Whenever I remove it it gets regenerated by WordPress and the hummingbird code is also added.
Hi @muchris,
That’s odd, since the plugin is deactivated it shouldn’t re-write the .htaccess file with Humminbird rules.
Can you please confirm if you have tried the “Deactivate All WordPress Plugins” step mentioned in the article that we have shared? If yes, can you please also try changing the theme and check if that brings any changes?
The following article can guide you with changing the theme manually using the database: https://www.wpbeginner.com/beginners-guide/how-to-properly-change-a-wordpress-theme/#how-to-change-wordpress-theme-manually
Please let us know the results so that we can further check this for you.
Kind Regards,
Nebu JohnHi Nebu,
Thanks for your reply. I have went ahead and deactivate the theme that I had (which changed the UI of the site as it should) but it didn’t fix the admin loop.
I also deactivated the plugins by changing the plugins folder name to “plugins-disable” and it broke the UI of the website but didn’t fix the loop and the htaccess keeps being rewritten with the hummingbird code shared above.
Not sure what else to try at this point.
Thanks,
ChrisHi @muchris
Thanks for response!
Let me get back to the “.htaccess being rewritten: it’s not “odd” but actually impossible for Hummingbird to write to .htaccess if Hummingbird is not even installed, unless either .htaccess is somehow “restored” automatically from some sort of backup or… if the code was never removed from it.
What I mean is:
1. Hummingbird can write to .htaccess and add such code but
– it cannot do it if it’s not active on site
– if it’s removed it does not leave any script behind that could write it on its own
– and it doesn’t “instruct WordPress” to keep re-adding this code2. It is unlikely but possible that .htaccess is somehow protected in a way that when you try doing changes it’s being restored; some hosting security feature could possibly behave that way; I wouldn’t expect it but it’s not impossible;
3. It’s quite possible that even if you try to manually remove the code from the .htaccess, these changes are actually simply not saved because .htaccess is protected from writing into it; it would be a file permissions issue and is quite common; depending on a tool used to editing the file – there may be no warning about file not being writable.
Taking that into account, can you make sure that .htaccess is writable at all (so permissions are e.g. like 750 or 660) and then again try editing the file and manually removing those rules? Once you confirm they are fully removed, try setting .htaccess permissions to 444 (so it’s read-only).
Getting back to redirect though: the code that Hummingbird added is solely for setting “expiration headers” – telling browser for how long should it cache given types of files. It doesn’t instruct server or browser to perform any kind of redirect.
Since the code is related to browser cache we could assume that with no site’s assets cached, browser should behave nicely and there should be no redirect, right?
Yet, I’ve visited your /wp-admin page which I have never visited before and I was also stuck in that loop. Furthermore, there’s important information in request headers (you can see it in browser console):
X-Redirect-By: WordPress
This is one of response headers during this redirect loops and it means that redirect was made by… WordPress, not a server or browser.
So the reason is different than code in .htaccess.
I’m not saying that it isn’t related to Hummingbird (though the fact it happens even if Hummingbird is not installed would suggest that it’s not) but it seems to be some sort of conflict or misconfiguration (often it’s some misconfigured security feature).
That being said, I see that the /wp-login.php page is loading just fine and displaying the login form:
– if you try to login there – are you able to login or are you also trapped in that redirect loop?
– what about if you try the same (login via /wp-login.php) in incognito browser window?Also, since you tried deactivating all plugins:
– are there any files inside “/wp-content/mu-plugins” folder? If yes, what are they?
– have you tried clearing server-side cache – if there is any?
– did the site have, by any chance, domain changed recently or was switched from “http” to “https” or was migrated from one hosting to another?Kind regards,
AdamHi @muchris,
Since we haven’t heard from you for a while. I’ll mark this thread as resolved for now. Please feel free to re-open the thread if you need further assistance.
Best Regards
Nithin
The topic ‘Admin redirect loop caused by Hummingbird’ is closed to new replies.