How to move a Symfony project from web hosting to localhost?

时间:2015-06-26 09:47:39

标签: php symfony symfony-2.3

I tried some solutions (ex: Transfer Symfony2 site onto localhost from web server), but never works, the result is always a blank page.

The project is on Symfony 2.3 and my php version is 5.5

Thanks

1 个答案:

答案 0 :(得分:1)

When accessing a Symfony2 site locally you need reference one of the routing files in the web folder directly. So try http://localhost/app_dev.php/ and it might give you an error message telling you what is going wrong. Also you can check the log files in the /app/logs folder to see what the problem might be.

Edit:
There are also several command line tools that might be needed to set up the project.

app/console doctrine:schema:update --force

This will check the database is in sync with your code and update the database if necessary.

app/console assetic:dump
app/console assets:install
app/console cache:clear

These are used to install css, javascript and other static assets as well as clearing the cache.