Skip to content
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

wp plugin update-db (similar to wp core update-db) #207

Open
robertoandrade opened this issue Jan 16, 2020 · 1 comment
Open

wp plugin update-db (similar to wp core update-db) #207

robertoandrade opened this issue Jan 16, 2020 · 1 comment

Comments

@robertoandrade
Copy link

Hi, was wondering if it'd be possible for the CLI to trigger plugin-specific db updates that normally are prompted on the admin UI when you update a plugin that requires database modifications with the new version, ie: ACF.

Ideally alongside a wp core update-db after upgrading WP one could run either a global wp plugin update-db to run all (or specific) plugin's hooks for db update similarly to how wp plugin update works today.

@swissspidy
Copy link
Member

Interesting suggestion!

The problem with such a feature is that there is no central way and no hooks for plugins to set up these kind of DB update strategy. That means ACF, WooCommerce, EDD, etc. all do their own thing. WordPress / WP-CLI don't know whether a plugin does do something with the database.

The only way would be for these plugins to offer their own commands for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants