understrap / understrap-child

The starter child theme for Understrap, the renowned open-source WordPress starter theme.
GNU General Public License v3.0
580 stars 330 forks source link

Files to exclude when uploading to live site? #153

Closed lilpxl closed 6 years ago

lilpxl commented 6 years ago

My annoyingly slow ftp speeds led me to ask this question... what files are safe to leave out (or more importantly we SHOULD be leaving out) when moving our child theme from local to production. Assuming there are a whole lot of files related to development (node modules, gulpfile, json... even the SCSS files?) that at best aren't necessary and at worst offer some kind of liability when moving to production. If this is the case, could be cool to have all the development related stuff in a single folder so anything not necessary for the live site could easily be excluded. Thanks all!

Thomas-A-Reinert commented 6 years ago

You can run gulp dist-product this will create a dist-product folder in which everything needed is compiled that should be uploaded. Save the rest for your development though

lilpxl commented 6 years ago

AMAZING. Thank you, I had no clue.

lilpxl commented 6 years ago

Actually I guess my question still has some relevance. For a theme that isn't meant for wide distribution there still seems to be a lot of stuff that we wouldn't need to include (gulpfile, composer, etc), is that correct?

axlright commented 6 years ago

@jaredsnider if you run gulp dist you'll get an even more pared down version that is set up for FTP export but not for production. It will have no sass and none of the source files. Just be sure to keep around your original development directory 😉

lilpxl commented 6 years ago

@axlright COOL! Thank you 👍

axlright commented 6 years ago

@jaredsnider You're welcome! You can also make a ZIP archive out of that and upload it directly into the Appearance > Themes section of the WordPress admin /wp-admin/ section and activate it from there. I do that often for updating the parent theme. I think you need to keep a stock theme like twentyseventeen around to switch over to while you delete the existing understrap / understrap-child theme, as you can't (I think) replace an active child or parent theme. But this route is good for times when you don't have FTP.

lilpxl commented 6 years ago

@axlright Or when FTP is painfully, excruciatingly slow :(

Thomas-A-Reinert commented 6 years ago

Yeap, totally forgot that, sorry! Thanks for chiming in, @axlright !

axlright commented 6 years ago

All good @Thomas-A-Reinert I pretty much forget everything every day ☁️

darrindevs commented 6 years ago

Do I need to continue to run gulp dist-product to update the dist directory or will it auto update as I work in the development files?

axlright commented 6 years ago

@ZainoLabs it's a one time function, similar to gulp copy-assets. It is not a watch style function like gulp watch-bs. You need to run it every time you want to export your content.