将 Symfony2 站点从 Web 服务器传输到本地主机 [英] Transfer Symfony2 site onto localhost from web server

查看:22
本文介绍了将 Symfony2 站点从 Web 服务器传输到本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述,我希望将一个在 Symfony2 中构建的网站从 Web 服务器转移到我的本地主机上.

exactly as the title states, I am looking to transfer a website, built in Symfony2, from a web server, onto my localhost.

我以前没有这样做过,我不确定要达到预期结果的步骤是什么,这将使网站从我的本地主机完美运行.

I have not done this before, and I am not sure what the steps would be to achieve the desired result, which woul be to have the website run perfectly from my localhost.

我已经在我的本地主机上安装了一个空白版本的 Symfony2,但我不知道从哪里开始?

I have installed a blank version of Symfony2 onto my localhost, but I am not sure where to go from here?

抱歉问的含糊不清.

推荐答案

那主要是 3 个步骤:

That would be mainly 3 steps :

  1. 将整个 Symfony2 站点文件夹下载到您的本地主机中.该文件夹将是包含app"、src"、web"等文件夹的文件夹.
  2. 从实时网络服务器
  3. 导出数据库,然后将其导入到您的本地主机中.这可以使用 PhpMyAdmin 来完成...
  4. 打开位于app/config"中的文件parameters.ini",然后更改数据库设置以匹配本地主机上的设置.
  1. Download the entire Symfony2 site folder into your localhost. That folder would be the one containing the "app", "src", "web", etc. folder.
  2. Export the database from the live webserver, and import it in your localhost. That could be done using PhpMyAdmin...
  3. Open the file "parameters.ini" located in "app/config", and change the database settings to match the one on your localhost.

应该可以.请注意,无需安装 Symfony2 的空白副本,因为无论如何您都可以通过下载整个应用程序来获得它.

That should probably do it. Please notice that there is no need to install a blank copy of Symfony2, since you'll get it anyway by downloading your whole application.

如果仍然无法正常工作,您可能需要查看位于根文件夹或web"文件夹中的 .htaccess 文件.

If something is still not working, you may want to have a look at .htaccess files located in the root folder, or in the "web" folder.

这篇关于将 Symfony2 站点从 Web 服务器传输到本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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