Redirect loop on wp-admin or wp-login.php

前端 未结 16 4158
温柔的废话
温柔的废话 2021-02-09 18:30

I put together a quick WordPress site locally using MAMP, then checked it into an SVN repo. I then checked it out on to my development server.

I didn\'t change anything

16条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-09 18:38

    I just had to flush my redirects. Since I couldn't access the Admin I added this to the top of my functions.php file:

    flush_rewrite_rules(); exit;

    Saved it and refreshed my site. Then remove the code from your functions.php file and then refresh again. That did it for me.

    I also think it might be a good measure to resave your permalinks.

    PS. I think the main issue came from theme-my-login as it was redirecting to /login.

提交回复
热议问题