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. 


Note:-

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

Related Articles

How To: Improve Magento Performance

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

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: Create A PHP Info File

A PHP info file displays information about your PHP installation that can be useful to...

How To: Display Products on Homepage

There are numerous ways to put products on your home page, and we’ll compile a list of code...

How To: Remove Add to Cart buttons from Catalog Pages

If you want to remove the “Add to Cart” buttons from the catalog pages, this is how...