How to manually generate bootstrap.php.cache using Symfony 2?

Well, the easiest way is to use

but if you don’t want to update all bundles and waste an hour of your time, you can use:

where <app> is placeholder for you app dir, like “app/frontend” or “app/backend”
in case you don’t have build_bootstrap.php on path above (it works for Symfony 2.7.x) just search for it inside vendor\sensio\distribution-bundle\Sensio\Bundle\DistributionBundle


  1. This command only builds cache for Symfony core files (I suppose Components).
    But what if I want to build a cache for all vendor libraries. Can you please show me how do do that?

Leave a Reply