28 Aug 2020
How to disable remove or delete symfony debug bar
How to disable remove or delete symfony debug bottom bar
If you create a project with symfony framework , in bundle by default debug bar is show on, this debug bar function for make information about apps your develop, you can see information detal on debug bar, so make your apps stable and run normaly before you publish , but now. how to remove or delete symfony debug bar in bottom symfony apps ??
How disable remove or delete symfony debug bar , for first you need to change on .env file on symfony apps,edit with notepad++ or visual code studio. and change APP_ENV=dev to APP_ENV=prod, and then save it.... violaaa..... now your symfony apps is clean and free from symfony debug bar. we hope this post article can solved your problem How to disable remove or delete symfony debug bar.
Or you can use composer cli on npm / git just run : composer dump-env prod
Update trouble when we deploy on shared hosting, well when im trying on localhost every things is oke, but this is not same on shared hosting, when deploy on shared host i have eror like this :
Oops! An Error Occurred ,
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
WTF !! whats wrong ?? why this not same with localhost if try to upload on host ?? well for this problem i don't now , but after try all configure i cant using prod on .env , so the solutions is... you can change prod to dev again and remove your .env.local.php and edit your .env file change prod to dev, save it after this, now you go to \config\packages\dev and then edit web_profiler.yaml , just change web_profiler:
toolbar: true to false so you can see full code like this :
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { only_exceptions: false }
And save it, refresh your website and viola your symfony apps is normal with no debug bar.
And if you need to try and test symfony blog CMS platform ,you can donwload /clone or fokr it on sourceforge or github, this is a source project from symfony blog demo. you can modify with you needed, with SEO functional for simple blog platform no need desctiption just use a title only for focusing you blog keyword.