How To: Move Magento from Subdomain to Main Domain

Moving Magento from your Subdomain to your Main Domain (and vice versa) is very seamless and easy.

All you need to do is to follow the following steps:-

  1. Go to Magento Admin --> System --> Configurations --> Web --> Unsecure URL & Secure URL. Change both the Secure URL and Unsecure URL to the domain that you are going to be moved to.  Be sure to include the "/" at the end of the domain name.
  2. Go to your File Manager and click "Select All". Click "Move" and key in "/public_html" to move it to the main domain's directory.
  3. You may need to clear the caches at "var/cache" and "var/session" after you have moved all files over.

You can also perform the Step 1 above through the database instead of going through the Magento admin:-

  1. Go to phpMyAdmin. Find and click your Magento database from the list of the left bar. 
  2. Scroll down and look for core_config_data. Click "Browse" (the first button at the side). 
  3. Find the path "web/unsecure/base_url" and "web/secure/base_url". 
  4. Click on the "Pencil" icon of both of the path above and edit the URLs accordingly (one path at a time)
  5. Click "Go" after the URLs have been edited. 


  • It is advisable to backup your files and databases before performing the above stated steps.
  • Email, SSL
  • 16 Users Found This Useful
Was this answer helpful?

Related Articles

How To: Setup Multiple Store for Magento

The following is the recommended guide to setup a Magento Multi-Store on our hosting plans. A...

How To: Add Home Link to Menu Bar

For the Home link in the menu bar of the main template you can add some code to one of the...

How To: Improve Magento Performance

Important Note: The following tips on performance improvements have been tested to work properly...

How To: Add Attributes to Product Grid in Category

Introduction Here we will show how to add your more attributes to the category view product list...

How To: Install Magento using Installatron Script Installer

There are a few easy steps that you will need to take to install Magento using Installatron...