将 Symfony2 站点从 Web 服务器传输到本地主机 [英] Transfer Symfony2 site onto localhost from web server
问题描述
正如标题所述,我希望将一个在 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 :
- 将整个 Symfony2 站点文件夹下载到您的本地主机中.该文件夹将是包含app"、src"、web"等文件夹的文件夹. 从实时网络服务器
- 导出数据库,然后将其导入到您的本地主机中.这可以使用 PhpMyAdmin 来完成...
- 打开位于app/config"中的文件parameters.ini",然后更改数据库设置以匹配本地主机上的设置.
- Download the entire Symfony2 site folder into your localhost. That folder would be the one containing the "app", "src", "web", etc. folder.
- Export the database from the live webserver, and import it in your localhost. That could be done using PhpMyAdmin...
- 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屋!