Update site Symfony2

Asked

Viewed 32 times

0

good morning.

I’m modifying a site made in Symfony2 and I’m having difficulty editing content. I take one of the files. Twig of the server that corresponds to the index or to one of the parts of the site, it stops working, or does not load, as expected. But if modified content or include something, the site is not modified.

I wonder if it is necessary to make some extra configuration, clear the symfony cache, or something like that.

It’s the first project I’ve picked up on symfony, so I’m not very familiar with the framework, and the site is hosted on a linux server, with ssh access.

1 answer

0

After modifying the file, clear the cache using console:

php bin/console cache:clear --env=prod

Each environment (env) has a cache configuration so, by default, the development environment does not need cleaning with each template modification.

Mind the fact that where I wrote --env=prod you need to define what environment (Environment) is in.

  • Thanks for the answer. I tried to use the code but gave an error response. " Could not open input file: bin/console"

  • depending on the SF version you have, the console is at the root of the project. Search for the file

  • After I did this, using the app/console at the root of the project, the site went down, with error 500. :(

  • The procedure is correct. If the site is in error, there was some problem entered since the last time SF cached.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.