- Web templates
- E-commerce Templates
- Loaded Commerce
- E-Commerce Comparison
- E-commerce Comparison: Payment and Shipping methods
- E-commerce templates compatibility table
- CMS & Blog Templates
- CMS Comparison
- CMS templates versions compatibility
- Facebook Templates
- Website Builders
Magento. How to move the store from localhost to the live server
July 1, 2015
This tutorial is going to show you how to move Magento website from localhost to the live server.
For instance, our Magento site is currently working at localhost/magento and it needs to be moved to the live server at www.templatetesting.com/vincent/magento. Here are the steps to follow:
Feel free to check the detailed video tutorial How to install Magento on localhost .
Log into the phpMyAdmin tool of your localhost software (in our case WAMP), open the current database and export it. Save it as a .zip/.sql file on your computer:
Open the database dump file you exported in any code editor (e.g Notepad ++ or Sublime Text2 editors) and replace the old domain name with the new domain name everywhere. We are going to change localhost/magento/ to templatetesting.com/vincent/magento in our file. Save the changes.
Open www directory of your localhost and find Magento installation. Compress all Magento folders and files into a .zip file on your computer:
Log into the phpMyAdmin through the hosting Control Panel of your live server www.templatetesting.com/vincent/magento and create a new database. Note the name, the username and the password of the new database out for future reference.
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:
Upload the backed up Magento files in the zip file to the directory or sub-directory on your new domain, i.e in the case with www.templatetesting.com/vincent/magento it’s a /vincent/magento/ subfolder and extract it:
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 code editor like Notepad++ and upload it back once the changes are saved):
You need to change the old info in lines 43 – 46 of that file with the corresponding info for the new database (the name, the username and the password ) :
<host>your_host_name]]></host> <username>your_user_name]]></username> <password>your_database_password]]></password> <dbname>your_database_name]]></dbname>
Save the changes to the file (or upload it back if you were editing it on your computer).
Go to \var\cache directory of your Magento installation and delete all the content (mage—1 , mage—2 etc folders):
Open the URL address of the new magento site, i.e. www.templatetesting.com/magento/vincent. If you have done everything correctly, you should see the site looking the same as on your localhost.
That is the end of the tutorial. Now you know how to move Magento website from localhost to the live server.
Feel free to check the detailed video tutorial below: