Magento: How to change your site URL/Domain using cPanel
In this article we will demonstrate how to change the URL/Domain of your Magento application.
For this article, we will assume that you are already logged into cPanel.
Step 1) Click the phpMyAdmin link found in the database section of the page.
Step 2) Click the database that your Magento site is using
Step 3) Locate and click on the core_config_data table located on the left side
Step 4) Locate the following two entries and edit the value section for both of them …
web/unsecure/base_url
web/secure/base_url
Step 4.a) Click the Edit icon for the row
Step 4.b) Enter the new URL in the value section (replacing the old value), then press Go
Your site may be working at the new URL at this point. Please try loading your site to see if it loads correctly. If it does not work we will need to clear the var cache. You can do this by following the steps below.
Step 1) Return to cPanel
Step 2) Click the File Manager link found in the Files section
Step 3) Double click on the “var” directory
Step 4) Double click on the “cache” directory
Step 5) Click the Select All option from the tool bar
Step 6) Click the Delete button located on the top tool bar
Step 7) Click the Delete Files button to confirm the delete
That’s it! Your site should now be working at the new URL/Domain.
RiskFreeRepair April 27, 2014 at 7:09 am
This does not work, make sure you back-up / export your /magenta/var/cache folder first.
James Davey April 28, 2014 at 7:50 am
Thank you for pointing that out! It is always a good idea to have a full backup of everything before making any changes, of course :)
Ashish @ MagikCommerce October 20, 2014 at 2:40 am
Seems to work flawlessly for me. Which Cpanel version are you using?
Bhanu June 24, 2015 at 11:30 am
hi, i am getting problems in cart after changing the domain name.
Cart products quantity is not updating .
Mark McQuaid June 24, 2015 at 11:44 am
Hi Bhanu,
Sorry to hear of your troubles. The process should have been pretty seamless but sometimes with Magento caching can come into play.
Did you follow the steps to clear your var/cache folder after changing the domain name?
If so, then we would suggest that you submit a ticket with our support team to investigate the matter on your behalf.
Bhanu June 24, 2015 at 1:49 pm
Hi, i changed domain name in magento configration and Cpanel .
Then flushed cache of magento from admin panel.
but everything except cart update is working.
Mark McQuaid June 24, 2015 at 3:02 pm
Sorry to hear the troubles persist for you. At this point we would suggest that you place a support ticket with our team so we can properly investigate this situation.
Jin September 6, 2015 at 3:02 am
beautiful instruction, helped me out. Thank you.