title: Symfony - How to set from dev to prod?
body: <p>I know that this is not the first post about this question, but I do it because others answers didn't solve my problem.</p>
  
  <p>I tried the basic :</p>
  
  <pre><code>$kernel = new AppKernel('prod', true);
  </code></pre>
  
  <p>But this is not the good way to do it because I still have Symfony errors...
  I don't know how to rewrite errors pages :</p>
  
  <p><a href="http://le-blog-etudiant.fr/blablabla" rel="nofollow noreferrer">http://le-blog-etudiant.fr/blablabla</a></p>
  
  <p>Do you know if this Symfony error is caused by the fact that my website is still in dev mode or because my <code>error.html.twig</code> page doesn't work ?</p>
  
  <p><strong>EDIT 1 :</strong></p>
  
  <p>I'm using <code>app.php</code> on my site, I set <code>$kernel = new AppKernel('prod', false);</code> and I did the command : <code>php bin/console cache:clear --env=prod</code> but it still display Symfony's errors</p>