Domain Change

Dinlow

Free Member
Mar 4, 2015
2
0
63
I built a magento site on one domain name, but want to change it to another domain name on same cpanel. Is there an easy way of doing this like swapping a theme folder over to new magento install, or will have i have to rebuild it again so all the URL's are correct.
 

webhostuk

Free Member
  • Jul 26, 2009
    1,448
    174
    UK
    www.webhostuk.co.uk
    Depends, do you wish to change the main domain or wish to add the second domain as addon domain. For WHM root panel you can directly get the main domain changed which should get most of the things changed .. you just need to check the config and director path files for magento to get the domain name changed.
    Now a days you also get one click auto installer for magento with Cpanel using softaculous.. So even if you change the domain and do fresh installation I don't feel that should take much of your time rather than playing with files.
     
    Upvote 0

    buildmeashop

    Free Member
    Feb 27, 2015
    14
    1
    66
    What do you mean by 'another domain on the same cpanel'? Do you mean you want to change the domain to a new one, or do you mean that you want to move to an add-on domain or a sub-domain of your existing domain? All are pretty easy unless you've got a lot of hard-coded image file names or hyperlinks
     
    Upvote 0

    Dinlow

    Free Member
    Mar 4, 2015
    2
    0
    63
    Thanks for all the replies and support, I built the Magento site on a addon domain, I want to change it to another addon domain. At the moment it has a temporary redirect, after a few failed attempts im still none the wiser, I tried going into phpMyAdmin and changing the path files (URL lines), then flushing the cache. This resulted in massive error and not being able to log in to site.
    Looking around some more I see what pipeten-carl is saying about changing it in the backend, but does this mean creating another magento install under second domain name, so that there is a second database?.
     
    Upvote 0

    buildmeashop

    Free Member
    Feb 27, 2015
    14
    1
    66
    Hi Dinlow. You don't need another database. Just find the core_config_data file in your database and change the value of these 2 fields to your new domain: web/secure/base_url and web/unsecure/base_url. Also, make sure that the document root of your new add-on domain is actually pointing to your magento installation.
     
    Upvote 0

    dx3webs

    Free Member
    Feb 22, 2011
    492
    131
    Lincoln, UK
    dx3webs.com
    one of the coolest things about magento is the ease of changing URLs. As above poster states you just need to change two lines in your core_config_data table. Having said that.. you may have more than 2 entries in there.. if you have gone and added base_urls for store views you may have a few places you need to change. Quickest way is to use phpmyadmin search feature like so :
    http://screencast.com/t/7NVwurkUi
    This will quickly pull up all yoru base_urls for all stores / websites you may have configured.
    Also.. make sure you have not added any custom redirects in your .htaccess file or index.html
    Also.. if you are using a apc / memcached / redis etc other cache make sure you flush them also.

    make sure you addon domain is pointing to the correct folder (create a test.txt file in the same root and make sure you can access this on the new url)
     
    Upvote 0

    Latest Articles

    Join UK Business Forums for free business advice