Saturday, October 25, 2014

Changing Magento base URLs

OverviewThis article shows how to change Magento Base URLs through PHPMyAdmin and the command line. 

 Method 1: changing Magento base URLs in Magento adminstrator panel

  1.  Log into your Magento admininstrator panel.
  1. On the top menu bar, click System > Configuration.
  1. On the left menu, click Web.
  1. Open the Unsecure and Secure dropdowns, locate the base URL line, and replace this with the new URL.  
  2. Clear the Magento cache and your browser's cache. The site should load properly now.   

Method 2: changing Magento base URLs through PHPMyAdmin

  1. Log into your SiteWorx account.
  1. On the left menu, click Hosting Features MySQL > PhpMyAdmin.
  1. You will be brought to the main menu for phpMyAdmin.  On the left side of the screen, locate and click the name of the Magento database corresponding to URL you want to change.   
  1. You will see a list of all the tables in the database in alphabetical order.  Search for the core_config_data table and click Browse.
  2. Expand the viewing area of phpmyadmin. At the top and bottom in the main panel, locate the grey box and change the number of rows to a larger number, such as 100.
  1. Locate the rows web/unsecure/base_url and web/secure/base_url and click Edit next to the corresponding lines.  Change the base URL to the intended string, and click OK.
  2. Flush the Magento cache, and the site should load with the set base URLs properly now.   

Method 3: changing Magento base URLs through the command line

Attention: Due to the possibility of irreparable damage, do not attempt to change the base URLs unless you are an experienced technician. 
  1. Log into the client's server using terminal.
  2. Gain access to MySQL using m or mysql -u root -p.
  3. Access their database using the following commandwhere database is the database name.
use database
  1. Run the following command: 
select * from core_config_data where path like '%base%url%';
      5.  This will display the current base_urls set in Magento
      6.  To change the base URLs, execute the following commands:
update core_config_data set value = 'http://domainname/' where path = 'web/unsecure/base_url';
update core_config_data set value = 'http://domainname/' where path = 'web/secure/base_url';

- See more at:

No comments:

Post a Comment