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 db limit to db prefix #106

Closed
kkmuffme opened this issue Jul 22, 2018 · 1 comment
Closed

wp db limit to db prefix #106

kkmuffme opened this issue Jul 22, 2018 · 1 comment
Labels

Comments

@kkmuffme
Copy link

Usually wp cli commands are limited in scope to the db prefix of the current installation, unless using e.g. --all-tables flag (e.g. in wp search-replace)

I suggest to also limit wp db reset (and perhaps also the other wp db commands) to the current page prefix (unless --all-tables is specified), as it will happen that people use wp db reset and, without realizing, delete ALL tables in the current database, instead of only the tables of the current installation.

@schlessera
Copy link
Member

The db reset command actually drops the entire database, so we cannot restrict what tables it affects.

However, we now have a new db clean command that only drops the tables and can target only tables of the correct prefix: #93

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

No branches or pull requests

2 participants