如何将本地 Magento 安装转移到我的实时服务器上? [英] How do I transfer a local Magento install onto my live server?
问题描述
我花了很长时间在本地开发 PC 上使用 Magento 构建商店.
I have spent a long time building a store with Magento on my local development PC.
现在我对结果很满意,我想将它上传到我的实时制作服务器.
Now that I am happy with the result, I would like to upload it to my live production server.
我必须完成哪些步骤才能确保此操作尽可能简单?
What steps must I complete to ensure this move is as easy as possible?
推荐答案
移动文件和数据库
我认为这两个步骤是显而易见的:
moving files and database
I assume these two steps are obvious:
- 将所有本地文件复制到生产服务器
- 转储您的 magento 本地数据库并将其导入您的生产服务器数据库
在生产服务器中编辑
现在在您的生产服务器上,您需要执行以下两个步骤:
editing in production server
now on your production server you need to follow these two steps:
编辑 app/etc/local.xml 文件并更改数据库信息
edit app/etc/local.xml file and change database info
在生产数据库中,在它的 core_config_data
表中,您应该找到包含本地安装 url 的每条记录,然后您需要更新这些值;可以通过此查询找到:
in production db,in its core_config_data
table, you should find every records containing the url of your local installation, then you need to update those values;which can be found with this query:
SELECT *
FROM `core_config_data`
WHERE `value` LIKE 'http://%';
编辑(感谢评论):
3.不要忘记删除var
文件夹内容
4.最好把app/etc/use_cache.ser
的内容也去掉
edit (thanks to comments):
3. Do not forget to delete var
folder contents
4. it'd better if you remove the content of app/etc/use_cache.ser
too
这篇关于如何将本地 Magento 安装转移到我的实时服务器上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!