Reading Time: 3 minutes

If you are a Magento developer, sometimes you happen to have to move a Magento eCommerce from one host server domain to a new host server domain or from one directory location to another directory location.

Migrating Magento to a new server is quite simple once you understand how to do it. Let’s see, in this article, how to do this. Let’s say that to do a migration, there are two different ways. Let’s see them in detail.

How to migrate Magento: method 1

  1. Back up the files to the testing server.
    Go to the admin backend of your test site and update Cache by System> Cache Management. Then download and save the entire Magento store root directory via File manager or FTP tools.
  2. Magento database export.
    Enter the phpmyadmin database area of ​​your server control panel and EXPORT your Magento store database in the format “name.sql.zip”.
  3. Move the magento files to the new server.
    Upload the root directory (all files) of your test Magento store backup taken in step 1 to the new server domain folder.
  4. Import the database to the new server.
    Go to your new phpmyadmin host account and create a new database, database user and database user password. Then open the database sql file saved in step 2 with a text editor and change the mention of the database name to the new database name, save it. Then import the database backup “name.sql.zip” saved in step 2 into this new database.
  5. Update the database dump file.
    The next step is to edit the database dump file. To do this, go to the magento live site folder, find the “app / etc / local.xml” file and enter the most recent database details that are created in step 4.
  6. Edit the base URL database table. The next step is to replace the old domain name of the server with the new domain name. For this go to your new phpmyadmin magento server database and edit the core_config_data table as shown below.
    – web / unsecure / base_url> http://www.newdomain.com/
    – web / secure / base_url> http://www.newdomain.com/
  7. Update the cache and re-index the data.
    The final step is to clear the cache. Go to your sites admin panel (Log in with test site username and password) System> Cache Manager> Select all and disable cache management. Then navigate through System -> Index Management. Select the fields under Status – “REINDEX REQUIRED”, then choose “Reindex data” from the drop-down menu and click Submit or delete all files in the new site’s “var / session” and “/ var / cache” folders.

Take a look at the frontend of your new Magento ecommerce store.

How to migrate Magento: method 2

The only problem with this method is that both Magento setups must be of the same version. But let’s see in detail.

  1. Go to the backend of your test site and update the cache from the system> cache management. Then make a backup of the test site phpmyadmin database by exporting the database in the format “dbname.sql.zip” (or any suitable format).
  2. The next step is to backup the following folders on the test site on your system
    – Contents inside the frontend folder (app \ design \ frontend)
    – Contents inside the frontend folder (skin \ frontend)
    – Catalog and other folders requests (media \ catalog)
  3. Install a new Magento store on the new server.
  4. Go to the server’s new phpmyadmin database and drop all tables.
  5. Unzip the backup database in the first step “dbname.sql.zip” and import the file “dbname.sql” into the new database.
  6. Copy the folders below into the respective new Magento server directory
    – Contents inside the frontend (app) folder in app \ design \ frontend.
    – Contents inside the frontend (skin) folder in skin \ frontend.
    – Catalog and other required folders in media \ catalog, xx \
  7. Change the base URL mention table (core_config_data table) to new magento.
    – web / unsecure / base_url> http://www.newsite.com/
    – web / secure / base_url> http://www.newsite.com/
  8. Go to your site’s admin panel System> Cache Management> Select All and disable cache management. Also, index the data by going to System -> Index Management. Select the fields under Status – “RE-INDEX REQUIRED”, then choose “Re-index data” from the drop-down menu and click Submit.

Check out your new Magento store.

pattern-lines

Free 30-days trial Hosting magento Fast, Secure and Optimized

Switch to Bhoost with 30 days free and migration included

Free 30-days trial
macbook