How to change the base_url in magento.,because my site were gone after i'm changing that on my magento admin

余生长醉 提交于 2020-01-04 05:32:07

问题


How to change the base_url in Magento, because my site were gone after i changed that on my magento admin settings... Now i got 404 error on that url, the admin and frontend won't open...


回答1:


execute the following query in mysql (via phpmyadmin or command line) to see what the current values are:

select * from core_config_data where path like '%base%url%'; 

and then update accordingly

update core_config_data set value = 'http://myhostname/js/' where path = 'web/unsecure/base_js_url';



回答2:


UPDATE `core_config_data` SET `value` = replace(`value`, 'https://www.oldname.com/', 'https://www.newname.com/') WHERE `value` LIKE '%https://www.oldname.com/%';



回答3:


step 1: mysql -u root -p press enter
step 2: Enter your database password
step 3:select * from core_config_data where path = 'web/unsecure/base_url';
step 4:select * from core_config_data where path = 'web/secure/base_url';
step 5:update core_config_data set value = 'https://domain.com/' where path = 'web/secure/base_url';
step 6:update core_config_data set value = 'http://domain.com/' where path = 'web/unsecure/base_url';
step 7: exit; press enter
step 8: clear session and cache
step 9: /etc/init.d/mysql start
step 10: sudo service apache2 restart



来源:https://stackoverflow.com/questions/5177362/how-to-change-the-base-url-in-magento-because-my-site-were-gone-after-im-chang

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!