无法更改 Magento 基本 URL,卡在缓存中 [英] Can't change Magento base URL, stuck in cache

查看:17
本文介绍了无法更改 Magento 基本 URL,卡在缓存中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在开发域上安装了一个实时站点.我更改了 core_config_data 中的 web/unsecure/base_urlweb/secure/base_url 字段,但我不小心拼错了新域.然后我加载了网站并注意到我的错误.我已经更正了拼写,但它似乎缓存了错误的域.我已经尝试重新导入数据库并更改 url,我已经删除了缓存目录中的所有内容,但 js 和 css 文件仍然在管理后端的每个链接中使用了错误的域.并且后台管理也指向了错误的域.

I have just installed a live site onto a development domain. I changed the web/unsecure/base_url and web/secure/base_url fields in core_config_data but I accidentally misspelled the new domain. I then loaded the site and noticed my mistake. I've since corrected the spelling but it seems to have cached the wrong domain. I've tried re-importing the database and changing the urls, I've deleted everything in the cache directory but still the js and css files are using the wrong domain in every link in the admin back-end. And the admin back-end is pointing to the wrong domain too.

有什么建议吗?这是一个旧的 Magento 1.3 安装.

Any suggestions? It's an old Magento 1.3 install.

推荐答案

如果您对 var/ 文件夹没有适当的权限,Magento 可以将其缓存信息写入系统 /tmp 文件夹.

If you don't have proper permissions on the var/ folders, Magento can write its cache information to the system /tmp folder.

这可能导致您更改 Magento 数据库中的基本 URL、清除缓存(手动删除 var/cache 中的所有 mage-?? 文件夹)、(清除 APC缓存(如果您正在运行操作码缓存),(手动禁用编译器(1.4.xx 及更高版本))并且系统仍会查找原始站点.

This can lead to a situation where you've changed the base URLs in the Magento database, cleared cache (manual deletion of all mage-?? folders in var/cache), (cleared APC cache if you're running the op-code cache), (manually disabled the compiler (1.4.x.x and later)) and the system still looks for the original site.

大多数拥有自己服务器的人发现,在修复、清除和重置权限,然后重新启动服务器后,该站点神奇地开始工作.服务器重启会清除 Magento 缓存文件的 /tmp,Magento 最终开始查看自己的配置以找到它所在的位置.

Most people who own their own server discover that the site magically starts working after fixing, clearing and resetting permissions and then rebooting the server. The server reboot clears /tmp of the Magento cache files and Magento finally starts looking at its own configuration to find where it's located.

此操作的屏幕截图...

Screen shots of this in action...

/tmp 中的 Magento 目录...

The Magento directory found in /tmp...

以及位于该目录中的 Cache.注意路径 -> /tmp/magento/var/cache

And the Cache living in that directory. Note the path -> /tmp/magento/var/cache

为了找到那个错位的缓存目录,如果你可以安装 n98-magerun,使用命令 n98-magerun.phar sys:info 来获取基本的系统信息列表其中一项是缓存目录位置.

For finding that misplaced cache directory, if you can install n98-magerun, use the command n98-magerun.phar sys:info to get a basic system info listing with one item being Cache Directory location.

这篇关于无法更改 Magento 基本 URL,卡在缓存中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆