I use this script on Symfony 2.3 projects. It should work for other versions...
- Delete
app/cache/directory (since cache:clear doesn't work well for me) - Execute
app/console cache:clear --env=? - Execute
app/console assets:install --env=? - Execute
app/console assetic:dump --env=?
? on the specified environment (default: dev)
- Copy
refresh-env.shfile to the application directory (e.g:/var/www/symfonyapp/) - Then execute:
$ chmod +x refresh-env.sh- Refreshing development environment:
$ ./refresh-env.shSince dev is the default environment it doesn't require parameters.
- Refreshing production environment:
$ ./refresh-env.sh prodThe refresh-twig-cache.sh script helps to clear just the twig cache and rebuild it for the pointed environment.
Previous instructions works fine for this script too.