-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Feature Request] WP-CLI integration #117
Comments
I don't use it, as I block request on the network level, but being able to manage plugins through wp-cli is a must have for a good plugin :) |
Hi @michacassola, Adding some But I guess I need more details on the type of command you want available. Considering the API Key, this is already possible to set it in setting (if you know the API Key):
But if you want a command to create the key itself, I think this won't be possible to have something that will work in all possible cases. The bouncer key cannot be created with a pure PHP script, as we have to use the CrowdSec CLI
And, as the cscli command is only available on the server with the installed CrowdSec agent, it won't be possible to create it if the agent is not on the same server as the WordPress. There could also be some permission issues between the For now, I guess the easiest way to script the installation of the CrowdSec plugin is to retrieve a bouncer key with the In my opinion, modifying the settings is already possible with the Please let me know if you were thinking about other wp-cli integration. |
Yeah, you are right, if all the options can be passed like that it is sufficient. |
I add this to my TODO list :) . I think I will provide a wp-cli example for each item in this documentation part: https://github.com/crowdsecurity/cs-wordpress-bouncer/blob/main/docs/USER_GUIDE.md#configurations If you can't wait, you could start by looking in the Thanks |
Hi @michacassola, as a first step in the integration work of WP-CLI, I added a paragraph about How to update settings with WP-CLI. Next step would be to add some real WP-CLI command to act on the bouncer (clearing, refreshing cache for example). Thanks |
Hi, I'd like to script the installation of the crowdsec plugin. I know of a workaround that could possibly work, but native integration to hand the API key and host details to the plugin and change the settings would be nice!
https://discord.com/channels/921520481163673640/1042925611427057786
The text was updated successfully, but these errors were encountered: