Hướng dẫn thay đổi domain mới cho source Magento
Khi mà bạn muốn thay đổi thông tin domain mới cho mã nguồn Magento đang sử dụng hiện tại của bạn. Bạn phải thực hiện thao tác thay đổi thông tin domain name tương ứng với giá trị “BaseURL” được chứa trong CSDL Magento.
Hôm nay mình sẽ hướng dẫn các bạn thay đổi giá trị BaseURL thông qua command line SSH tác động lên CSDL Magento. Các bạn hoàn toàn có thể làm mới giá trị đó thông qua giao diện Admin Panel Backend Magento hoặc sử dụng phpMyadmin để tương tác với CSDL.
$ mysql; mysql> use ; mysql> select * from core_config_data where path='web/unsecure/base_url' OR path='web/secure/base_url'; +-----------+---------+----------+-----------------------+---------------------------------+ | config_id | scope | scope_id | path | value | +-----------+---------+----------+-----------------------+---------------------------------+ | 9 | default | 0 | web/unsecure/base_url | http://cuongquach.com/ | | 10 | default | 0 | web/secure/base_url | http://cuongquach.com/ | +-----------+---------+----------+-----------------------+---------------------------------+
mysql> update core_config_data set value='http://cuongquach2.com/' where path='web/unsecure/base_url'; mysql> update core_config_data set value='http://cuongquach2.com/' where path='web/secure/base_url';
$ rm -rf ./public_html/var/cache/* $ rm -rf ./public_html/var/session/*