将magento站点移至另一台主机,重定向到旧站点 [英] Moved magento site to another host, redirecting to the old site

查看:68
本文介绍了将magento站点移至另一台主机,重定向到旧站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已将magento网站移至另一位主持人.但是它正在重定向到旧站点

在移动网站之前,我们进行了以下更改

1. DB backup
2. files are zipped and copied to another host.

将网站移至其他主机后

1. changed the /web/secure and /web/unsecure values in the DB.
2. In magento files /app/etc/local.xml changed the database name.
3. cleared the var/cache
4. cleared the var/tmp
5. cleared the var/session.

但仍然将magento网站重定向到旧网站.

有人可以帮我吗?

谢谢

解决方案

克隆或移动网站涉及的几个步骤.

注意::通常的做法是在复制到新位置之前清空var/cache,var/session目录.下面提到清除缓存,因为在遍历列表并正确设置数据库访问权限,BaseURL等之后,有必要清除缓存的配置.

  1. 将应用程序文件复制到新位置,并将数据库导入MySQL. (最好使用tarball和数据库转储sql文件来完成此操作,ftp遇到诸如获取.htaccess文件进行传输,大小写问题等问题.)注意:更老练的Magento管理员使用rsync,这要容易得多.

  2. (重要!).确保文件/文件夹许可权以及所有者/组正确无误,以便var/文件夹系统可写.否则,Magento缓存将写入系统/tmp而不是Magento var/中,并且只有重新启动服务器或手动删除后,Magento缓存才会从/tmp中清除.另外,没有var/可写意味着将文件写入var/report/的任何严重错误都将无法写入任何堆栈跟踪,这会加重您的安装负担.

  3. 确保app/etc/local.xml指向正确的数据库,并确保是否备份原始local.xml它没有以.xml结尾的->需要类似于local.xml.sv1

  4. 更改数据库条目不安全的BaseUrl"和安全的BaseURL"以指向您的新位置(http://www.example.com,以及分别安装了https://www.example.com的ssl cert).使用phpmyadmin在core_config_data表中查找路径web/unsecure/base_urlweb/secure/base_url. (注意:条目将存在于每个范围集,最小值为Global)

  5. 通过删除var/cache

  6. 中的所有mage--?子文件夹来手动清除缓存
  7. 如果您在以前的站点上使用编译器,请从Magento根目录使用SSH命令行php shell/compiler.php disable禁用编译器.

  8. 尝试加载您的管理后端,您现在应该在新的服务器URL上.

执行以下步骤应清除所有导致Magento坚定地重定向回旧服务器的故障.相信我,我已经实现了所有这些.

We have moved out magento site to another host. But it is redirecting to the old site

We did following changes before moving the site

1. DB backup
2. files are zipped and copied to another host.

after moving the site to another host

1. changed the /web/secure and /web/unsecure values in the DB.
2. In magento files /app/etc/local.xml changed the database name.
3. cleared the var/cache
4. cleared the var/tmp
5. cleared the var/session.

but still the magento site is redirected to old site.

Can any one help me with this.

Thanks

解决方案

Several steps involved in cloning or moving a website.

NOTE: It's common practice to empty the var/cache, var/session directories before copying to new location. Clearing cache is mentioned below as it's necessary to clear the cached config after you've run through the list and properly set database access, BaseURL, etc.

  1. Copy application files to new location and import database into MySQL. (best to do this with a tarball and database dump sql file, ftp has issues with things like getting .htaccess files to transfer, case to matter, etc.) Note: more sophisticated Magento admins use rsync, it's far easier.

  2. (important!!) Make sure file/folder permissions and owner/group are correct so that var/ folder system is writable. Otherwise the Magento cache gets written in system /tmp instead of Magento var/ and only a server reboot or manual deletion will clear Magento cache out of /tmp . Also, not having var/ writable means that any drastic errors that write a file to var/report/ will fail to write any stack traces, compounding your installation heartburn.

  3. Make sure app/etc/local.xml points to the proper database and make sure if you back up the original local.xml that it doesn't end in .xml -> needs to be something like local.xml.sv1

  4. Change your database entries Unsecure BaseUrl for and Secure BaseURL to point to your new location (http://www.example.com and if ssl cert installed https://www.example.com respectively). Use phpmyadmin to look for the paths web/unsecure/base_url and web/secure/base_url in the core_config_data table. (Note: entries will exist for each scope set, minimum is Global)

  5. Manually clear your cache by deleting all the mage--? subfolders in var/cache

  6. If you were using the compiler on the previous site, disable compiler with SSH command line php shell/compiler.php disable from the Magento root.

  7. Attempt to load your admin backend, you should be on the new server URL now.

Following these steps should clear all the hiccups that cause Magento to adamantly redirect back to the old server. And believe me, I've had them all happen.

这篇关于将magento站点移至另一台主机,重定向到旧站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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