While working on a website, adjusting the custom logo for WordPress login form, I suddenly run into an error: After unusual long page loading time, I got a “This webpage has a redirect loop” error on browser window, instead of the login form. The page URL is: http://yoursiteurl/wp-login.php
The last thing I did was to add one line code in style.css, and there is no problem there. It is weird and out of blue. Well, giving this is a live website, I have to fix it immediately.
Trying a different browser on different machine, smartphone regenerated the same result.
(Different browser may show different message. For example, the message is “The page isn’t redirecting properly” on Firefox.)
After few round of search and test, I finally fixed this problem by simply re-saving the Permalink structure. It makes sense but unexplainable, as the last update I made to the site has nothing to do with .htaccess.
Here is the steps:
Step 1: Login to WordPress admin dashboard.
Step 2: Goto Settings > Permalinks, and locate your current permalink settings. (I assume you are using “Post Name“)
Step 3: Change the setting to something else, such as “Default”, click “Save Changes“.
Step 4: Quickly reset the permalink to original setting “Post Name“, and click “Save Changes“.
This is how I fixed the problem.