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
Force reinstall all plugins or themes #3293
Comments
You can achieve the same by composing two commands:
I'll include this as an example in the docs |
Oh fancy! Thanks! Question (obviously I'm not that versed in bash scripting): Is the first $ your bash prompt? I use zsh and have a custom prompt, but I it didn't work when I included the first $.
Obviously I'm not that versed in bash syntax.... I found this https://www.gnu.org/software/bash/manual/bash.html#Command-Substitution which I assume is that function, just want to make sure I'm not missing something. |
No, |
Great snippet @danielbachhuber If anyone is looking to reinstall themes in the same manner, the command is:
|
So this normally works, but I'm getting fatals from plugins and the theme calling a member function on null (old code using globals). Normally --skip-plugins and --skip-themes would bypass that, but here I get
I guess you can't skip when installing? Seems odd though as I thought those were global params https://developer.wordpress.org/cli/commands/plugin/install/ |
@jb510 You're using bash substitution, which means you're running two separate commands. You'll need to also run |
damn it... that thought occurred to me briefly and then I forgot to try it. You bash skilled are legendary... |
Try this if you don't want to attempt drop-ins, mu-plugins, waste files left inside plugins folders etc. This carefully looks for directories only inside wp-content/plugins and forces a reinstall.
|
You can also use Force Reinstall to force plugin and theme reinstallation |
I feel like this has been suggested before, but the past issues I found were actually different (either about core, or about an individual plugin/theme)
I would really like it if there were a way to:
wp plugin update --all --force
and
wp theme update --all --force
Which would reinstall all plugins/themes with the latest version from the repo.
There is a regular plugin I've used for this in the past: https://wordpress.org/plugins/baw-force-plugin-updates/ but it seems a natural fit to wp cli.
This is common step when dealing with a hacked site and frankly I'd like to run it periodically on non-hacked sites just in case anything got out of sync between repos and servers.
The text was updated successfully, but these errors were encountered: