Categories

Featured templates

Magento. How to move your website from one domain to another

Norman Fisher April 8, 2013
Rating: 4.7/5. From 3 votes.
Please wait...

This tutorial is going to show you how to move Magento website from one domain to another.

Magento. How to move your website from one domain to another

For instance, our Magento site is currently working at www.template-test.com/magento and it needs to be moved to another domain at www.templatetesting.com/magento. Here are the steps to follow:

  1. Log into the phpMyAdmin through the hosting Control Panel of your first site www.template-test.com/magento, open the current database and export it. Save it as a .zip/.sql file on your computer.
  2. Move all your site files to a separate folder on your computer. In this example we are going to backup the content of the /magento/ directory on our FTP. If your hosting Control Panel has a FileManager with the ability to archive the content, first archive it, then download and save it as a .zip file to your computer.
  3.  You should now have one folder with the backup copy of your Magento site files and another .sql or .zip file of the database.
  4. Open the database dump file you exported  in any text editor (e.g Notepad) and replace the old domain name with the new domain name everywhere it in. That is we are going to change  template-test.com/magento to  template-test.com/magento in our file (no / at the end of the domain name or www/ http:// at the beginning of it). Save the changes.
  5. Log into the phpMyAdmin through the hosting Control Panel of your other site www.templatetesting.com/magento and create a new database.
  6. Copy the name, the username and the password of the new database out for future reference.
  7. Open the new database you have just created through phpMyAdmin and import the database dump file exported from the old site into your new database.
  8. Upload the backup Magento files to the directory or sub-directory on your new domain i.e in the case with www.templatetesting.com/magento  its  a /magento/ subfolder.
  9. Go to the \app\etc\ directory on your new domain and open the local.xml file to edit (you can just download the file on your computer and open in any simple text editor like Notepad and upload it back once the changes are saved)
  10. You need to change the old info in lines 43 – 46 of that file with the corresponding info for the new database (step 6 of  this tutorial):
  11.   <host><![CDATA[your_host_name]]></host>
    <username><![CDATA[your_user_name]]></username>
    <password><![CDATA[your_database_password]]></password>
    <dbname><![CDATA[your_database_name]]></dbname>
  12. Save the changes to the file (or upload it back if you were editing it on your computer) and open the url address of the new magento site, i.e. www.templatetesting.com/magento. If you have done everything correctly, you should see the site looking the same as on your old domain.
  13. Sometimes the new site does not show up on a new domain till you delete everything from the \var\cache directory  (mage—1 , mage—2 etc folders).

Feel free to check the detailed video tutorial below:

Magento. How to move your website from one domain to another

Templates for Magento
This entry was posted in Magento Tutorials and tagged another, domain, Magento, move, website. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket