Do we have to delete .gitignore within Roots folder for production to use minified files?

Hey all,

I’ll give some context of my setup, which I think the source of the problem I stated above. I don’t know if this is the default behavior but without removing some lines in .gitignore my production breaks (no css, js files with those hashes are loaded).

I use PagodaBox to host my git-powered workflow for WordPress + Roots combo. I’ve used BedRock for some setup on Digital Ocean before, but PagodaBox makes keeping the git-workflow while deploying to the cloud/server much smoother. Here’s some visual of what I’m talking about:

I’ve created a recipe that will work with PagodaBox right away if you want to replicate it: GitHub - ajmalafif/pagopress: Boilerplate for WordPress Skeleton + Roots Theme + Composer + PagodaBox.

Please see here:

Hey there,

Yeah was aware of that and tried putting

define('WP_ENV', 'development');

inside wp-config.php and doesn’t work (even tried on local-config.php).

So I ended up have to modify the .gitignore file and it works now…

I think it’s confusing to have the css and js files gitignored - when you deploy to production the files aren’t there.

So I had to add:


to the /web/app/themes/roots/.gitignore file

Why is main.min.css and scripts.min.js in .gitignore to begin with?

Because those assets shouldn’t be in your repository. See by @austin

1 Like

Also a bit more in-depth:


Sweet, thanks for the resources!