wp-cli / core-command

Downloads, installs, updates, and manages a WordPress installation.
MIT License
49 stars 50 forks source link

Leave `wp-content/plugins` and `wp-content/themes` directories when using `--skip-content` #230

Closed danielbachhuber closed 1 year ago

danielbachhuber commented 1 year ago

Creates the wp-content/plugins and wp-content/themes directories (and their corresponding index.php files) when using wp core download --skip-content, instead of ignoring them.

While these directories were intentionally excluded in the original pull request...

I'm not sure if we should consider this a breaking change, or a bug with the original implementation.

Fixes https://github.com/wp-cli/core-command/issues/228

swissspidy commented 1 year ago

What about other directories like wp-content/upgrade and wp-content/languages, are these also affected?

danielbachhuber commented 1 year ago

@swissspidy Neither of those directories are affected. Here's where we unwound accidental deletion of wp-content/languages: https://github.com/wp-cli/core-command/pull/212

schlessera commented 1 year ago

I'd consider this a bug fix. We were too aggressive with the removal and caused issues, and as you said, the original intent was not to remove the folders, but rather to not include the default extensions. So I'd say this is not a breaking change.

maximejobin commented 1 year ago

Sorry for being late to the party. I would also argue this is a bug fix... that can break code.

My main argument is : installing WP with CLI with the --skip-content flag makes a user unable to install a theme or plugin if it's not done, at first, with CLI. So if you just install WP with CLI then never use CLI again, you are left with an unusable installation regarding the addition of themes and plugins.

danielbachhuber commented 1 year ago

My main argument is : installing WP with CLI with the --skip-content flag makes a user unable to install a theme or plugin if it's not done, at first, with CLI. So if you just install WP with CLI then never use CLI again, you are left with an unusable installation regarding the addition of themes and plugins.

I think this is a reasonable argument! Thanks for sharing, @maximejobin