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

site delete: allow deleting a site with the --url option #506

Open
1 task done
35grain opened this issue Jul 3, 2024 · 2 comments
Open
1 task done

site delete: allow deleting a site with the --url option #506

35grain opened this issue Jul 3, 2024 · 2 comments

Comments

@35grain
Copy link

35grain commented Jul 3, 2024

Feature Request

Describe your use case and the problem you are facing

Currently the blog ID or slug must be specified when using the command. In cases where a custom domain is used, however, the --slug option fails and it is tedious to look up the assigned site ID in an automated use case.

Describe the solution you'd like

Allow site deletion by only specifying the --url option. For example: wp site delete --url="http://example.com".

@35grain
Copy link
Author

35grain commented Jul 3, 2024

get_blog_id_from_url() could probably be used here as with get_id_from_blogname() and the --slug option?

@swissspidy
Copy link
Member

We could implement wp site get <id|url> instead, then one could pair wp site delete with wp site get http://example.com --field=id. This would be more in line with all the other commands.

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