This tutorial provides detailed information how to move a Magento store from one host to another (or to a different hosting account).

MySQL database backup.

On SiteGround servers you have phpMyAdmin included by default in cPanel for your account. In other cases you will have to use the same tool or a similar one that is capable of exporting your MySQL database. Detailed information how to perform a MySQL backup you can find in our MySQL Tutorial.

Alternatively if you don’t have phpMyAdmin installed but you have shell access you can use mysqldump tool. The syntax is as follow

mysqldump -h HOST -u USER -p DATABASENAME > FILENAME.sql

HOST is the database server hostname or it can be omitted if you are running the MySQL server locally.

USER - a user with full privileges to the Magento database.

DATABASENAME - is the full name of the database which Magento is running.

FILENAME - can be anything you find suitable for the backup file.

Also if you have Plesk, DirectAdmin or any other web hosting management tool- you can look at the available options. Many panels allow you to dump the database with just a few clicks. For example cPanel does have an option for this.


Transfer Files.

You will need to download all files from your current store and upload them at the new location. This can be a time consuming task considering that a standard Magento installation consists of many files. A good alternative is to archive the files prior to downloading/uploading them if possible.

If you have SSH access you can log on your server -> magento installation directory and archive all the files using the following command:

tar -czif ARCHIVENAME.tar.gz

This will create a tarball archive of all the files in the directory.

You can now download  the archive and easily upload it to the new location. To extract it at the new location use the following command in the desired destination folder for the Magento installation:

tar -xzif ARCHIVENAME.tar.gz

Adjust Configuration.

After the files are restored you should alter the configuration file in order to match the new settings. All you need to change here is the database details at the new location. Those are stored in the app/etc/local.xml file. The lines you need to alter are:



HOSTNAME should be the database hostname, most commonly - localhost

USER is a user that has full privileges to the database

PASSWORD is the password for the database user

DATABASENAME is the complete database name for the database you are gonna use with the transferred Magento

Restore Database.

Once you have adjusted the options above you should restore the database at the new location.

A good practice is to add several options in the MySQL backup file prior to uploading it. The following should be added in the beginning of the SQL file:


The next option should be added at the end of the file after all other queries:


You can now import the database using phpMyadmin -> Import or another MySQL tool depending what kind of access you have to the website.

In case you would like to restore the database via shell command you can use the following:

mysqldump -h HOST -u USER -p DATABASENAME < FILENAME.sql

and enter the password for the database user when asked. 

Note that if the Magento online store is supposed to work with a different domain name at the new location you should alter the entries for it in the MySQL database. 

The table you should edit is core_config_data and the values you need to change are in the path column. Change the web/unsecure/base_url and web/secure/base_url to match the new domain name by altering the value column for both records.

That is all. Your Magento should now be properly functioning at the new location.

Login to post comments

advertise with us

Boost your traffic and expand your pool of potential customers

8000 active members

Ready to join Now?

CMS Portal - The free marketplace for submitting Joomla, Drupal, Wordpress, Magento, phpBB, Prestashop, vBulletin, Opencart Templates and more.


Email Newsletters

Make sure you don't miss interesting happenings by joining our newsletter program.
konya escort eskisehir escort canakkale escort samsun escort balikesir escort aydin escort hatay escort kahramanmaras escort giresun escort tokat escort
Joomla Templates Free Joomla Templates Virtuemart Templates K2 Templates JoomShopping Templates HikaShop Templates SobiPro Templates OpenCart Themes
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes