:::: MENU ::::
moving magento to another domain

How to move magento from one server to another

Hi friends,

If you are a Magento developer sometimes you need to move the Magento ecommerce shop from one host server domain to new host server domain or from one directory location to another directory location. Migrating Magento to a new server is a simple task once you know how to do it. This “How to move Magento from one server to another” post will outline the steps involved to successfully migrate a Magento website.




Follow the below given instructions,

1) Back up the files in the test server.

Go to your test site admin backend and refresh Cache by System > Cache Management. Then download and save  the whole magento shop root directory via File manager or FTP tools like FileZilla client.

how to move magento

2) Export the magento Database.

Enter your server control panel phpmyadmin database area and EXPORT your magento shop database in to “name.sql.zip “ format.

move magento

3) Move magento files to the new server.

Upload the root directory ( all the files) of your test magento shop backup taken on the step 1 in to the new server domain folder.

4) Import the database to the new server.

Go to your new host account phpmyadmin and create a new database, database user and database user password.

moving magento

Then open the database sql file saved on step 2 with a text editor or on your favorite IDE and edit the database name on the file in to the new database name created above, save it as ‘name.sql.zip’ format. Then IMPORT the ‘name.sql.zip’ database backup saved in to this new database.

magento migration

NB: 1) The file to import may be compressed (gzip, zip) or uncompressed. A compressed file’s name must end in .[format].[compression]. Example: magentostore.sql.zip . 2) The file size is to import within the limit of “Maximum allowed size for uploaded files” was set in php.ini otherwise increase ‘Maximum allowed size for uploaded files’ or use partial import. 3) Make sure the MySQL versions of new and old databases are matching.

5) Update the database details file.

Next step is to edit the database details file. To do this go to magento live site folder, find out app/etc/local.xml file and enter the latest Database details which is created on the step 4.

6) Modify the base URL database table.

Next is to replace old server domain name with new domain name. For this go to your new server phpmyadmin magento database and modify core_config_data table as shown below.

web/unsecure/base_url     >   http://www.newdomain.com/

web/secure/base_url         >   http://www.newdomain.com/

how to migrate magento

7) Refresh cache and Reindex Data.

The final step is to clear the cache. Go to your sites admin panel ( Login with the test site username and password ) System > Cache management > Select all & disable cache management. Then navigate through System—>Index Management. Select fields in Status — ‘REINDEX REQUIRED’, then choose ‘Reindex Data’ from drop down and click Submit or delete all the files in “var/session” and “/var/cache” folders of new site.

Take a look to your new magento ecommerce store frontend. Happy coding…..




Here is an another method ( one problem is on this method both magento setups must be the same version ),

1)  Go to your test site backend and refresh cache by system > cache management. Then take a backup of test site phpmyadmin database by exporting database in to “dbname.sql.zip” format ( or any suitable format).

2) Next is to take a backup of below folders on the test site to your system

(a)  Contents inside frontend folder    (app\design\frontend)

(b)  Contents inside frontend folder    (skin\frontend)

(c)  Catalog & other required folders    (media\catalog)

3)  Install a new magento store in to the new server.

4)  Go to the new server phpmyadmin database and delete all the tables.

5)  Unzip backup database on the first step “dbname.sql.zip” and import “dbname.sql” file to the new database.

6) Copy below folders to their respective new magento server directory

(a)  Contents inside frontend (app) folder to app\design\frontend.

(b)  Contents inside frontend (skin) folder to skin\frontend.

(c)  Catalog & other required folders to media\catalog, xx\

7)   Edit base URL mentioning table (  core_config_data table ) on the new magento.

web/unsecure/base_url     >   http://www.newsite.com/

web/secure/base_url         >   http://www.newsite.com/

8)   Go to your sites admin panel System > Cache management > Select all & disable cache management. And also index data by go to System—>Index Management. Select fields in Status — ‘REINDEX REQUIRED’, then choose ‘Reindex Data’ from drop down and click Submit.

Check your new magento store.

………….ALL THE BEST……….


Leave a comment

Before hitting COMMENT button, please fill * marked fields and the correct reCAPTCHA response.