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

Ability to Exclude Revisions from wp db search #156

Open
mrwweb opened this issue Dec 7, 2019 · 1 comment
Open

Ability to Exclude Revisions from wp db search #156

mrwweb opened this issue Dec 7, 2019 · 1 comment

Comments

@mrwweb
Copy link

mrwweb commented Dec 7, 2019

Describe your use case and the problem you are facing

I often use wp db search to determine if a certain shortcode, class, etc. is in use. These search results include revisions, so it's possible that a search with 10 results only represents a single post. This makes the function significantly less useful for what feels like a pretty simple use case.

Describe the solution you'd like

The simplest solution would be some type of standalone flag so I could do something like wp db search 'string' --exclude-revisions.

My only hesitancy in suggesting this is wondering whether some more generalized way to include or exclude other things would be useful. On the flipside, a super powerful way to limit the search query would probably end up being much less user-friendly.

@bilaltas
Copy link

That should also be helpful while exporting the database.
wp db export --exclude-revisions

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

3 participants