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

前端 未结 16 4065
温柔的废话
温柔的废话 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:42

    I had a similar issue in my case it was due to restoring a db script that was created with WP Migrate DB. The script had merge tags in like "## DEV URL ##" which i needed to fix before running the script on mysql and pointing the wp-config.php to the correct database.

    0 讨论(0)
  • 2021-02-09 18:42

    My problem was that the hardisk was full. Trying to log into the wordpress administration panel was redirecting me to wp-login.php. I was able to log in again the moment I deleted some files.

    0 讨论(0)
  • 2021-02-09 18:43

    I was getting DoS pages when trying to publish in my WP site. I found advice that changing permissions in the function.php file to 600 could solve the issue, also to add to that file a script snippet . It was a WP help page. I was able to get to the publishing in a work-around way. Still have the DoS when I try to open the editor.

    0 讨论(0)
  • 2021-02-09 18:47

    In my case it was Apache's DirectoryIndex issue. The wp-admin was being accessed by wp-admin/index.php but not with wp-admin and showing ERR_TOO_MANY_REDIRECTS.

    It sounds like Apache's DirectoryIndex may be set "incorrectly". Try resetting this at the top of your .htaccess file:

    DirectoryIndex index.php
    

    See the full answer here. Can't access admin dashboard with wp-admin without /index.php after it

    0 讨论(0)
  • 2021-02-09 18:52

    If you are useing Cloudflare, from SSL/TLS tab of your Cloudflare account, select Full encryption. It will solve the issue.

    0 讨论(0)
  • 2021-02-09 18:54

    If you're using Cloudflare you might want to try adding this to the TOP of your wp-config.php file:

    define('WP_SITEURL', 'https://www.example.com');
    define('WP_HOME', 'https://www.example.com');
    define('FORCE_SSL_ADMIN', true);
    define('FORCE_SSL_LOGIN', true);
    if(isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https')){
      $_SERVER['HTTPS']='on';
    }
    

    It's important that you add it to the top of the wp-config.php file or you'll end up with "Sorry, you are not allowed to access this page" error messages.

    Credit: https://www.meltajon.com/dev/wordpress-wp-admin-redirect-loop-with-cloudflare-ssl

    0 讨论(0)
提交回复
热议问题