Magento is a campus management system. Some time when you move your website to new location or to new directory, it require to change Base URL in the database of Magento.
You can use phpmyadmin to change this database or you can directly change it from command line
Using PhpMyadmin
- Open database,
- Find the table named “core_config_data “
- Search for web/unsecure/base_url and web/secure/base_url and replace them with new values.
Using Command prompt
- Login to database
- and run following commands
1 2 |
update [prefix]core_config_data set value="http://[newdomain]/[newfolder/]" where path='web/unsecure/base_url'; update [prefix]core_config_data set value="http://[newdomain]/[newfolder/]" where path='web/secure/base_url'; |
Clear cache
You need to clear cache from magento, it store its cache in var/cache
1 |
rm -rf /var/www/[path to html folder]/var/cache/* |
After that try to access magento using new URL, it should be accessible.
Comment Policy:
Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.