2

I intially had an instance of magento installed that was using a databse, then i intalled another intance of Magento Using the same database, but the problem that occured is that now my old website is getting redirected to new website.

I had previously configured my old Website's url from localhost to somethingElse.com, but now it is only localhost. I am not able to understand what has happened.

So, is there a method such that both the websites use the same Database and that i am not able to access my first website via Url, so some solution that doenot use admin panel?

and can someone also explain me what change has takken place due to my new installtion on same dataBase?

3

In theory it's possible. You just have to change the base url to {{base_url}}. This will make Magento autodetect the URL you are using. But this is not a safe option.
Also there is no need to have 2 instances of code but the same db. You can end up with big issues because of different extensions or when saving different config values. You should use the multiple website feature that Magento offers. So you can have multiple websites under the same Magento instance.

  • okk i will create a new database then,but just for my knowledge i wanted to know if i had to make changes to {{base_url}} then where do i had to do that? – user3151033 Feb 5 '14 at 12:40
  • how about table prefix? or am I missing something... – FlorinelChis Feb 5 '14 at 12:48
  • @FlorinelChis. That might work. I think I misunderstood that both websites should use the same tables as well. – Marius Feb 5 '14 at 12:50
  • if i had to make changes using {{base_url}} then i had change table to core_config_data table in phpMyAdmin, there's a link related to this magentocommerce.com/wiki/recover/restore_base_url_settings – user3151033 Feb 5 '14 at 12:56
  • MageBayVaporation took out that link. – Fiasco Labs Aug 27 '15 at 4:06
0

I guess it's possible. Two machines with different IP addresses, different domain names pointing to the different IP addresses. This sounds very similar to load balancing in the sense that you redirect traffic to another machine/IP. I'm not an expert in that area, so I might see it wrong. If the code on both machines is kept in sync (using rsync), I don't see a problem.

The only issue might be the var-folder. I don't know if cache and session folders should be kept in sync, probably not. That can be tested though.

0

Use table Prefix while installation of another website on same database as stated by @FlorinelChis in the above comments- it is a better method.

and if you want to make changes to your currentWebsite url as stated by @Marius, then refer this http://www.magentocommerce.com/wiki/recover/restore_base_url_settings

  • That link underwent MageBayVaporation. – Fiasco Labs Aug 27 '15 at 4:06
0

When you installed the magento again with already existing database, the core_config_data table has been modified.

In the same table config_id 9, 10 stores your website URL. If you wish to revert it back to the old magento installation URL, then change value column of these records to your old website URL..

About the "2inONE" thing is highly discouraged. Because of the same reason that Marius has given.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.