Support » Fixing WordPress » "Too many redirects" error after migration

  • Resolved marcosaccioly


    After migrating my wp installation from an IIS-based server to a linux install (both on shared hosting environments), I can’t access my website anymore in the way I used to.

    ## Here is what I have right now:
    1) I’ve been able to successfully import all data. You can see a post here: (permalinks currently disabled)
    2) Admin page is accessible through (though I have to authenticate and then reload the page because the redirection does not work) and all works fine over there

    ## Here’s what I’ve tried already to no avail:
    1) disable all plugins
    2) disable permalinks
    3) truncate tables and reimport database
    4) change DNS settings in my Plesk panel

    I imagine this is an .htaccess problem, but I’ve tried solving and could not manage it.

    Here’s my .htaccess in the website root directory

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /site/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    Here’s my .htaccess in /site (wordpress) directory

    php_value max_input_time 200
    php_value post_max_size 20M
    php_value max_execution_time 200
    php_value upload_max_filesize 15M
    # rewrite da locaweb - subfolders
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . /site/index.php [L]

    I appreciate any help and thank the good souls in advance. 🙂

Viewing 15 replies - 1 through 15 (of 15 total)
  • Moderator t-p


    I can’t access my website anymore in the way I used to

    Please elaborate the issue

    Please elaborate the issue

    Thought I was specific enough. Sorry.

    Try accessing the website through the URL: You’ll see the “too many redirects” issue.

    That’s it. This is how I used to access my website.

    hi Marco,

    The solution is this when you have plesk (and updated this recently with WP3.6):

    -> Open your domain “Open in Control Panel”
    -> Click on [Hosting Settings] next to the domain name printed in blue;
    -> set [Preferred domain] to [none]
    -> Save settings

    Thats it. this worked for me!

    plz lemme know if it worked out for you


    I couldn’t follow your solution. What control panel are you talking about?

    @wpyogi: As stated in the question itself,

    2) Admin page is accessible through (though I have to authenticate and then reload the page because the redirection does not work) and all works fine over there

    I can access the login page and the admin pages.

    Moderator t-p


    I checked in FF:

    The page isn’t redirecting properly

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

    Are using any redirect plugin(s), etc.? refusing to accept cookies?

    Have you tried:
    -deactivating ALL plugins temporarily to see if this resolves the problem. If this works, re-activate them individually (one-by-one) to find the problematic plugin(s). If you can’t get into your admin dashboard, try deactivating via FTP or SFTP or whatever file management application your host provides. If applicible, also remember to deactivate any plugins in the mu-plugins folder. The easiest way is to rename that folder to mu-plugins-old.
    – To rule out any theme-specific issue, try switching to the unedited default theme for a moment using the WP dashboard. If you don’t have access to your admin area, you can switch to the default theme by renaming your current theme’s folder in wp-content/themes and adding “-old” to the end of the folder name using via FTP or SFTP or whatever file management application your host provides. Alternately, you can remove other themes except the default theme. That will force your site to use it.
    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems (because the hooks remain unless plugins completely removed or some plugins stick around in cached files. So by renaming the folder, you break them and force them inactive).

    the Control panel of Plesk plesk

    @tara the site worked flawlessly on the previous server, as stated in the question itself.

    I’ve tried the options you described for the plugins, but to no better end.

    @bonami: I can’t find the links or options you described. My plesk version is 11.0.9. I have 13 other sites on the same server working normally with WordPress and/or other tools.

    I have also tried to delete the .htaccess files, but the error persists. So it is not an .htaccess issue. =(

    when you click here in Plesk Administration Panel: there is a setting [Preferred domain]. Set this to [none]

    I have disabled all redirections I had (because of the subfolder) and also disabled all .htaccess. So I’ve noticed my WP installation ( is redirecting to my root domain ( That’a why it was in loop.

    Anyone has any ideas on that? Why would WP redirect to my root? Heres my folder structure:

       /site [wordpress installed here]
          ... [all files]
       ... [other folders and files]

    Here’s the content from my index.php:

     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     * @package WordPress
     * Tells WordPress to load the WordPress theme and output it.
     * @var bool
    define('WP_USE_THEMES', true);
    /** Loads the WordPress Environment and Template */

    @bonami: can’t find that option in my panel. Here’s a screenshot.

    Just as information, I have tried a fresh install and all works absolutely fine:

    God… How can I restore my site back? I don’t need a fresh install, I need the old site back. =(

    Moderator t-p


    Try manually re-uploading all files and folders EXCEPT the wp-config.php file and the /wp-content/ directory from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones. Read the Manual Update directions first!

    Make sure you backup everything (including your database) before doing any actions.

    @tara: I ended up using the fresh install. This was too much of a headache and though it will be weeks before the site is completely functional again, there were some upgrades too with the new versions of WP and theme. I thank you all for the help and would like very much to know why wordpress didn’t like the port to linux server, as all I did was to get files & database and import them on the new server, changing appropriate db settings and URLs.

    Thank you all.

    Moderator t-p


    Glad you got it resolved 🙂

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘"Too many redirects" error after migration’ is closed to new replies.