Moving app to production mode in Symfony 2

Noor picture Noor · Feb 13, 2012 · Viewed 44.2k times · Source

Can someone help me to move my Symfony 2 application into production mode?

Currently, the application is running properly in /app_dev.php.

I'm googling, but I'm not finding a definite guide for deployment in Symfony 2.

Answer

Cerad picture Cerad · Feb 13, 2012

Couple more things to consider:

php app/console cache:clear --env=prod --no-debug
php app/console assets:install web_directory
php app/console assetic:dump web_directory

You might also run into permission issues with the cache directory. I would actually first make sure everything works in development mode on the server before switching to production mode. And if all you get is blank screens in production mode then set debug to true. And of course know how to check your error logs.