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

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

    I faced same problem after I restore backup from other server , it was promising issue I solve it this way .

      chown -R www-data:www-data          /var/www
      chmod -R g+rwx                     /var/www
    

    Where /var/www the place to store website files , replace it with suitable path according to your configuration , e.g /usr/share/nginx/www << default Nginx

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

    with nginx config I had originally only this line and experienced the same redirect issue:

    location / {
        try_files   $uri /index.php$is_args$args;
    }
    

    after adding this everything was fine:

    location /wp-admin/ {
        index index.php;
        try_files $uri $uri/ /index.php$args;
    }
    
    0 讨论(0)
  • 2021-02-09 18:58

    The above answers got me pretty close. In our particular case, someone at some point had added in some rules to the htaccess file in the site root and in the admin folder to block traffic from everywhere except some whitelisted IPs (when attempting to access wp-admin).

    Example:

    <Files wp-login.php>
       order deny,allow
       Deny from all
    
       # Allow from this IP address
      allow from 123.45.67.89
    </Files>
    

    Adding our IP to the whitelist in both files remedied the problem.

    0 讨论(0)
  • 2021-02-09 19:00

    To remove the lines

    define('DOMAIN_CURRENT_SITE', 'www.sitename.de');
    
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    

    from wp-config.php should do the job.

    These lines are not necessary for a multi

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