roots / bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure
https://roots.io/bedrock/
MIT License
6.15k stars 1.16k forks source link

[Feat] Keep the themes folder clean by skipping installing default themes during updates #706

Closed hirasso closed 7 months ago

hirasso commented 7 months ago

Summary

Hi there! I'm jumping back into using Bedrock after a few years rolling my own solution. While scanning the .gitignore, I noticed that the current default theme is being ignored:

https://github.com/roots/bedrock/blob/3573b025c7abca9638845caf9450804b9c98aaaa/.gitignore#L5

In my own setup, I've been using this constant in my wp-config.php:

// Prevent default themes from being installed automatically during updates
define('CORE_UPGRADE_SKIP_NEW_BUNDLED', false);

See the constant being used in WordPress Core.

That keeps my /themes folder nice and clean and I don't have to update my .gitignore every year. What do you guys think about adding this to application.php?

Additional context

n/a

retlehs commented 7 months ago

Howdy! twentytwentyfour is installed as a Composer dependency which is why it's in the .gitignore file: https://github.com/roots/bedrock/blob/3573b025c7abca9638845caf9450804b9c98aaaa/composer.json#L43

The roots/wordpress-no-content package does not include any of the default WP themes or plugins, and it's a better out-of-the-box experience to include a theme with Bedrock

Feel free to remove it from own Bedrock install if you using a different theme