transfer magento website from one domain to another

1.2k views Asked by At

I have been trying to transfer my magento website to another domain of mine on the same hosting server.

I have searched over the Internet for this but unfortunately didn't find answer about the transfer within same hosting server. However there are a lot of solutions if someone transfer from one server to another.

I have 2 domains on a hosting server. One is mydomain.ca and other is mydomain.com, currently mydomain.ca is running and the folder of mydomain.com is empty.

What I wanna do is to run mydomain.com with the same website which is running on mydomain.ca

If anyone can help that would be greatly appreciated.

2

There are 2 answers

2
Mohit Kumar Arora On

If your server has any hosting panel, then there must be an option to copy content from one place to another. You can easily copy content from current virtual host directory (say mydomain.ca) to virtual host directory of (say mydomain.com).

Then login to DB administration tool (say phpMyAdmin), select database of current website, click on operations, then click on copy database.

Then provide name of database where you want to copy existing database.

Now you have to do only 2 changes:

  • In core_config_data table of copied database, change unsecure base url and secure base url.
  • In app >> etc >> local.xml of new virtual host folder, change database connectivity details (i.e. host, username, password and database name).

Now delete var/cache, var/session folders from new virtual host directory.

That's all.

1
Andrew On

If you are planning to have them both running the same website then I think there's a simpler approach.

if your website is currently running as mydomain.ca, then all you need to do is "park" your other domain on this same account. Cpanel etc will usually allow you to do this no problem.

This will basically setup mydomain.ca as a pointer to mydomain.ca. they will both point to the same directory/document root, so you'll only have one set of files and no extra directories to worry about.

some info on doing this via some shared hosting platforms:

https://documentation.cpanel.net/display/ALD/Parked+Domains

http://support.hostgator.com/articles/cpanel/what-is-a-parked-domain-how-do-i-create-and-delete-one

Once the second domain is "parked" they will both point to the same website. If you then wanted to have them use different store fronts, themes etc, you could manage this inside magento without the need to change anything else on the hosting side of things.