Magento site redirected to localhost from live server : Fix

Hi folks,

Right now I am fighting with Magento. This is a real pro, and i am struggling with it. Last couple of weeks i faced a lot of obstacle to grip Magento but now I feel that according to time I am gonna flying with it 😀

Though I gathered lot of experience over magento, but now I need to share only first two things that is migrate the installation with data and database to a different server. I tested my store in localhost and then upload the hole thing to a live server, and here I faced two problem that is connect database with live server and another is my live store redirect me to my localhost. This is annoying and after some googling I found the solution as follows,

First to connect with live database you need to open the xml file /app/etc/local.xml and edit the connection block with your database credentials.

Second, from database table core_config_data edit web/unsecure/base_url path value with your live server URL

Bingooo!!!! I solved my two prime issues with this. Hope you can also solve yours.

(Visited 50 times, 1 visits today)

4 Comments

  1. Brian November 8, 2012 at 3:22 AM

    Dude, this really helped me a lot. I know this is possible to change in the backend, but I couldnt get in there for good reasons. So thanks ALOT.

  2. Visnjicanin December 1, 2013 at 5:42 PM

    Hi Tapan and thank you so much for sharing a light on this issue, it really helped me a great deal to configure my Magento instance on a live server. Just a quick note, this was a problem with my instance and i haven’t figure it out immediately, in local.xml file, at the host section i had to put instead of , alongside database credentials, then everything on a live server worked like a charm! 😀 Thanks again! 🙂

    1. Visnjicanin December 1, 2013 at 5:49 PM

      oops…i have put code segment in my previous post, and it was filtered out…i wanted to say that i had to put in host segment of local.xml file the value of “127.0.0.1” instead of “localhost”, that, alongside everything setup like you instructed helped my live store come to life! 😉 Cheers. xD

      1. Tapan Kumer Das December 1, 2013 at 6:17 PM

        Oops! Sorry for not mention that. In live server 127.0.0.1 will not work. Instead that you need to use localhost .

Leave a comment

Your email address will not be published. Required fields are marked *