Magento is very popular to build an e-commerce website at a glance. It is a consistent system with many many useful configuration.
Magento is very popular to build an e-commerce website at a glance. It is a consistent system with many many useful configuration.
I am also a newbie with magento. Recently, I did a very irregular step that is building everything on server, then move it back to localhost for a faster data input and modification. It took me couple hours dealing with the base_url configuration. For anyone have same problem, take a look at my step to save a bit your time :-D
Scenario: I backup database and sourcecode then restore on localhost with same configurations, when typing in the url, it redirect me to live server :-?
mysqldump -u username -p databasename > databasename.sql
use databasename; select * from core_config_data; #this show all the entries in a particular table
This is what you get
+-----------+---------+----------+--------------------------+--------------------------------+ | config_id | scope | scope_id | path | value | +-----------+---------+----------+--------------------------+--------------------------------+ | 1 | default | 0 | catalog/category/root_id | 2 | | 2 | default | 0 | web/seo/use_rewrites | 1 | | 3 | default | 0 | web/unsecure/base_url | http://mywebsite.com/ | | 4 | default | 0 | web/secure/base_url | http://mywebsite.com/ | | 5 | default | 0 | general/locale/code | en_US | | 6 | default | 0 | general/locale/timezone | America/New_York | | 7 | default | 0 | currency/options/base | USD | | 8 | default | 0 | currency/options/default | USD | | 9 | default | 0 | currency/options/allow | USD | +-----------+---------+----------+--------------------------+--------------------------------+
update core_config_data set value='http://local.magento.com/' where config_id = '3'; update core_config_data set value='http://mywebsite.com/magento/' where config_id = '4';
Note: Take a look at new url:
http://local.magento.com/
Even we work in localhost, we need http:// and the slash at the end. Without it, you get error of request or the css/js/images file are not found.
UPDATE 'core_config_data' SET 'value' = 0 WHERE 'path' = "dev/js/merge_files" OR 'path' = "dev/css/merge_css_files";
Enjoy !!!