• Hi,

    I have recently moved all my wordpress-websites from a shared host to a dedicated server. Following the migration, we have experienced trouble accessing the wp-admin on a few of them. The front-end of every site is working just fine, and for the majority of them the wp-admin is working as well. However, on 4 websites i get an infinite redirect loop when I’m trying to access /wp-admin.

    We won’t get any help whatsoever from our host it seems, so I’m turning to you as I have run out of possible sollutions.

    So let’s start with what all these problem-sites have in common. They all have the same parent theme for starters. However, a lot of the sites that do work have the same parent theme as the ones that don’t, so i’m not sure if the problem lies there. All the sites I use have been installed using the same method, same wordpress-version (3.5.1) and the same version of the themes, and they all look very similar to eachother, and from what I know, there shouldn’t really be anything special with the sites that are not working.

    What I have tried so far:

    Switching of all plugins
    Made sure .htaccess doesn’t have any redirects in it (also tried deleting the .htaccess)
    Changed to standard TwentyEleven theme in the database

    I have tried a number of other things as well, that I have found in similar threads, but none of them have worked. I’m not really that familiar with coding and such.

    I can’t find anything obvious that stands out when comparing the working sites to the non-working sites, but it’s hard when you’re not sure what to look for. Thus I have no idea of what the root of the problem might be.

    Any help would be greatly appreciated, and if you require any more information just let me know and I’ll provide it. Have been unable to access this for a couple of days now and I’m starting to get worried!

Viewing 8 replies - 16 through 23 (of 23 total)
  • I’ve made a huge mess of things. I deleted the second site through QuickInstall (or so I believed), and tried to install it through Fantastico De Luxe, but then it said there were some files I had to delete manually, like wp-admin. I went into the File Manager and deleted as many files as I could, just a mass murder of files. Now there’s all sorts of problems. I would make a great programmer. Now it gives me a 404 error, and so does my first site! I might have deleted my first site as well! Oh it’s not a bad loss but yeah.

    I completely deleted my first site. I didn’t have a backup. Is there any way I can restore it?

    coldcedar, I feel your pain, I WAS having the same issues as you and reading your blow-by-blow breakdown put a smile on my face ??

    But I have managed to fix my redirect loop! Yay! For me, it was a bit of a wordpress.com + www.ads-software.com issue as I got the redirect error as soon as I changed my domain nameserves from wordpress.com to www.ads-software.com. So I knew it wasn’t a plugin issue because I hadn’t even touched my www.ads-software.com site yet!

    So, here’s what I did!
    First, I changed my domain to NOT be the primary domain on my wordpress.com account – this probably seems super obvious but it’s never mentioned anywhere and just seems like something that would automatically change with the nameservers but nope! You can do it in the store>my domains section in the dash!

    Second, I put those lovely pieces of code from MAX Website Design and Fathi (thanks guys, you’re both generous souls) into my wp-config (which, if anyone is lost, can be found in the public_html folder (in the c-panel file manager if you’re on bluehost!)). It took me a little while to get it right (forgot to remove the www. as, coming from wordpress.com, my domain doesn’t have one of those! ROOKIE ERROR!) but I got there in the end.

    And finally, EMPTY YOUR BROWERS’ HISTORY/CACHE! I’m logged into wp on firefox and was trying to load my site unlogged-in on safari and it keep giving me the redirect error until I cleared my history. I guess because maybe it was still trying to direct me to the wordpress.com blog? But once I cleared it, it worked a CHARM!

    Anyway, I don’t know if any of that will help you coldcedar (or anyone else) but I just thought I’d share it on the off chance! Best of luck everyone and here’s hoping it sticks!

    and my site is lauraimurray.com although it’s currently in maintenance mode so there isn’t much to see ??

    thanks again everyone, you’re all so generous.

    Allow me to throw my hat into the ring here. My answer to the problem was not described above. We run a suPHP configuration on our server, so file/folder permissions can actually cause a redirect loop for the wordpress wp-admin folder IF the files and folders do not have the correct permissions assigned.

    To fix this I simply login to SSH and run these commands:

    cd /home/{account}/public_html
    chmod -Rf 644

    This chmods ALL files/folders (recursively) to 644–which is what FILES they should be. Then run:

    find . -type d -exec chmod 755 {}\;

    This chmods all directories to 755 (correct setting).

    Voila. This fixed any redirect issues.

    One other thing which is important if you have moved the wordpress site from another account on the server (e.g. a subdomain on a dev domain) to a primary cpanel account, the user permissions may be incorrect. Go into wp-admin dir and simply to an ls -ltr to confirm that the folder/group match that of the account.

    If not – to fix this is easy:

    chown -Rf {user}:{user} *

    Problem fixed. ??

    I should also point out that the BEST thing to do when facing a redirect loop (or any other sort of 500 error) is to tail the apache log file, i.e.:

    tail -f /usr/local/apache/logs/error_log

    Then try to hit the admin url. It’ll explain the exact error and greatly help with troubleshooting.

    ABSOLUTELY LOST..HELP! My URL is registered thru GoDaddy as Turquoise-Bear.com My WP ID was turquoisebearaz. I migrated T-B.com and now I get a REDIRECT LOOP msg. I have 5 pages and several photos, but nothing displays when I attempt to log in. Any help is appreciated.

    Modification to my original question… I spoke with GoDaddy. It appears that they set up a forward from Turquoise-Bear.com to turquoisebearaz.wordpress.com. I appear to have created a forward from WP back to T-B.com; creating an endless loop. My question, now, is how to I turn off the loop from WP to Godaddy?

    If its any help to anyone. I had this problem as well because as with most host, the only way to direct the primary domain to a directory other than root is to use a .htaccess method, and that works fine except when going to /wp-admin (no trailing “/”) because when it redirects to the wp-login.php it adds a redirect_to parameter in the URL, which in my case meant it included the “_production” directory in the absolute path.

    I think this is a bug with WP, but either way the way to fix it was to insert this line in the _production directory .htaccess file.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]  <-- This line
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Hope that helps

    fixed

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Wp-Admin has a redirect loop after migrating to new server’ is closed to new replies.