WordPress.org

Ready to get started?Download WordPress

Forums

Wp-Admin has a redirect loop after migrating to new server (19 posts)

  1. frajdel
    Member
    Posted 6 months ago #

    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!

  2. Fathi
    Member
    Posted 6 months ago #

    Verify if you have an issue with the "www"
    Just try to access your admin page with and without the www

  3. Fathi
    Member
    Posted 6 months ago #

    If you have trouble with the full domain, then add this code at the bottom of your wp-config file:

    define('WP_HOME','http://www.yourdomain.com');
    define('WP_SITEURL','http://www.yourdomain.com');

    Just add the exact domain as worked in the past, if you used a simple domain.com without www then delete the wwww from the above code and don't forget to change "yourdomain" with your Url.

  4. jspurling
    Member
    Posted 6 months ago #

    Hi, having the exact same problem here - did you find a solution?

  5. Jeff
    Member
    Posted 5 months ago #

    Hi, I am also having the same problem - it'd be great to find a solution :-)

  6. MAX Website Design
    Member
    Posted 5 months ago #

    Fathi's solution worked for me. Just defined the absolute path before these lines:

    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');

    in the wp-config file as Fathi suggested.

  7. coldcedar
    Member
    Posted 2 weeks ago #

    I know absolutely NO CODING and I've been pulling my hair for a few hours. THANK YOU FATHI! THAT WORKED!

    I went into the File Manager of my web hosting control panel, found the wp-config file, then added those two define lines to the end of the file! Somehow, even an idiot like me was able to do this! I WIN THIS TIME COMPUTER, I win this time...

  8. coldcedar
    Member
    Posted 2 weeks ago #

    Oh the absolute horror. It worked for a while, but now it has a redirect loop again. And even worse, it's affected another wordpress site of mine. Now I can't access my other wordpress site dashboard and it redirects to this site for some reason and back to the log-in screen. Help!

  9. coldcedar
    Member
    Posted 2 weeks ago #

    Somehow those two lines of code went missing. I put them back in and my new site is working now, but now my old one redirects to my new one! Ah!

  10. coldcedar
    Member
    Posted 2 weeks ago #

    So now my new site's WP dashboard is working, but my old one isn't!

  11. coldcedar
    Member
    Posted 2 weeks ago #

    HAH! IT WORKS! IT WORKS! This is so strange! Now I'm using two laptops, and the laptop I usually use, my old site WORKS! But I can't access that site on my second laptop.

    I'll just carry two laptops around whenever I go to Starbucks and pretend to be interesting and yet so desperately, desperately lonely. Maybe I can invite a woman to use my other laptop. "Hey uh, want to use my laptop? I have two. I have two laptops. Please love me."

    edit: Now it seems like neither site will work on my second laptop but will on my first. But it just worked a second ago on my second. It may not seem like it, but I'm like really smart. I'm like a really smart person.

    EDIT: SECOND SITE NOT WORKING AGAIN! Defeated laughter! Oh help me...

  12. coldcedar
    Member
    Posted 2 weeks ago #

    It seems that when I disconnected Jetpack from my new site, it may have deleted the site, because now when I go to the site, it doesn't show wordpress, but my domain server's default 'empty' page. I guess I'll try reinstalling wordpress for my new domain.

  13. coldcedar
    Member
    Posted 2 weeks ago #

    Oh it's working again! But for how long? I reinstalled WordPress for that domain but it still redirected. Then I popped in those two lines of code. After a long wait, voila! It's working again!

  14. coldcedar
    Member
    Posted 2 weeks ago #

    I think there's also an issue with Jetpack or just simply linking the new domain with the old domain on the same WordPress account. UHHH!

    And possibly because I used Fantastico De Luxe to make my WordPress site with my first domain, and I used QuickInstall to make my second WordPress site. Could that be an issue?

  15. coldcedar
    Member
    Posted 2 weeks ago #

    Wait a minute wait a minute wait a minute. I don't think my two sites are on the same WordPress account. When I got to WordPress.com and type in my e-mail and password, VOILA! My first site works! But if I try to go to www."myfirstsite".com/wp-admin - NO DEESAY. If I go to www."mysecondsite".com/wp-admin and type in my username and password from QuickInstall, VOILA! Now I guess I'd like to connect the two on the same WordPress account. But all in all I'm happy. Well, this has been an ordeal. Thank you very much.

  16. coldcedar
    Member
    Posted 2 weeks ago #

    Nope, still have redirect problems. Absolutely insane. Going to try deleting the second site again and installing it through Fantastic De Luxe like the first site.

  17. coldcedar
    Member
    Posted 2 weeks ago #

    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.

  18. coldcedar
    Member
    Posted 2 weeks ago #

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

  19. Lauramur
    Member
    Posted 1 week ago #

    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 + wordpress.org issue as I got the redirect error as soon as I changed my domain nameserves from wordpress.com to wordpress.org. So I knew it wasn't a plugin issue because I hadn't even touched my wordpress.org 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.

Reply

You must log in to post.

About this Topic