Friday 27 June 2014

Move magento site from subdomain to main domain

Its quite easy to move magento site from subdomain to main domain (and vice-versa). You can do it by two different ways and it is more easy when you go with the below steps.

Step 1:


  1. Go to Magento Admin Page –> 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 need to clear the caches at “var/cache” and “var/session” after you have moved all files over.


Step 2:


  1. Go to phpMyAdmin. Find and and choose your database on which your magento site is running. Scroll down and look for core_config_data table and click “Browse”.
  2. Find the path “web/unsecure/base_url” and “web/secure/base_url”.
  3. Click on the "Edit" of both of the path above and edit the URLs accordingly. Click “Go” after the URLs have been edited.
  4. Once the URLs has been edited, you need to clear the caches at “var/cache” and “var/session” 


Note:- It is always good to have backup your files and databases before doing these exercises.

No comments:

Post a Comment