-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The --skip-content
flag does not create folders inside wp-content
#228
Comments
This is linked, in some way, to this issue: #190 |
--skip-content
flag does not create folders inside wp-content
After investigation, it all happens here: core-command/src/Core_Command.php Line 1527 in 2c79f63
My suggestion:
|
Here's the original pull request for And the issue that inspired it: wp-cli/ideas#59 Creating empty If we changed the behavior for the We could potentially add some other flag instead, but I don't really like that idea. We could also "fix" this with documentation (call out the fact that folders aren't created and you'll need to do so yourself). |
Daniel, Thank you for your fast answer! I read the issue, the idea and tried to understand what's the reason for all this. From what I understand, the idea was to get a fully functional WordPress installation without having to delete the Twenty* themes and also get rid of both Akismet and Hello Dolly. WP offers a ZIP file named So if the My guess is that developers who use this feature also install plugins (or at least one!) from CLI. If/when they do, the folder is created and there is no problem. If, like me, you spin WPs to do testing on vanilla installations all the time, you install WP from CLI and then upload manually your plugins. Doing so will fail as there is no way to install a theme or plugin with the UI if the folders do not exist. I still believe this should be considered a bug or a conception issue that should be fixed. But no matter if you agree or not (that's totally fine!), I would strongly suggest to edit the documentation as the flag does not do exactly what is written. On the other hand, I know this could break scripts that could've been done as a workaround for this issue. I do not know how we can do that research to find out what should be done. Until we can solve this (if we can!), my vanilla installs will be made by not using Let me know if I can help in some way! |
Maybe WordPress should just create the folder if it's missing? |
Well... the folder was created during the installation but deleted by WP-CLI. Also, when installing a plugin with CLI, it creates the folder if it does not exist... something that WordPress itself does not do. I'm just unsure where the problem should be handled. That being said, I could be a good safety for WordPress to check and create the folders if they do not exist. If it were up to me, I'd say: WP-CLI should not create a situation like this one. The |
I'll look into this further when I have a moment. It may be a few weeks, however. |
@maximejobin After reviewing the history of the issues, I'm amenable to creating We will need to make an evaluation on whether it's a breaking change or not. |
If you run:
It creates what I would call an unusable installation.
My expectation would be a working installation without themes or plugins... not an installation that does not create needed folders in the
wp-content
folder.The probleme is that I installed WordPress from WP CLI. Then, I logged in and tried to install a plugin and it gave an error because the
plugins
folder does not exist.That being said, if I would've installed a plugin with WP CLI, the folders would have been created correctly.
I would argue this is a bug even if that was the original intention as it leaves the installation in an unusable status.
The text was updated successfully, but these errors were encountered: