Changing from dev to prod in Symfony gives 500 error in shared host

I recently hosted Symfony 5 web app in Shared host. Development environment is running well in in live but when I edit in .env from env=dev to env=prod I get following error.

domain.com is currently unable to handle this request.
HTTP ERROR 500

In mean when I check the prod cache I only find this:

App_KernelProdContainer.php.lock

1 answer

  • answered 2021-06-23 08:53 Muh Fadjar Rhomadoni

    1. Try to clear your cache php bin/console cache:clear --env=prod
    2. Try to change cache permission sudo chmod -R 777 var/cache
    3. If still error try to see error log in var folder