Saturday, October 25, 2014
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
- Log into your Magento admininstrator panel.
- On the top menu bar, click System > Configuration.
- On the left menu, click Web.
- Open the Unsecure and Secure dropdowns, locate the base URL line, and replace this with the new URL.
- Clear the Magento cache and your browser's cache. The site should load properly now.
Method 2: changing Magento base URLs through PHPMyAdmin
- Log into your SiteWorx account.
- On the left menu, click Hosting Features > MySQL > PhpMyAdmin.
- 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.
- 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.
- 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.
- 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.
- 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.
- Log into the client's server using terminal.
- Gain access to MySQL using m or mysql -u root -p.
- Access their database using the following command, where database is the database name.
- 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';
In Magento 1.4 and higher versions, you have to comment code below which is present around line 80 to 100 in