Is it possible to automatically run some wp-cli commands after staging. This would make your Wordpress staging even more useful.
This is my ideal workflow:
Click "Create Staging" button.
The staging instance is created and then two wp_cli commands are automatically run:
i) wp plugin deactivate plugin1 plugin2
ii) wp db query "SQL query to update plugin keys"
Make changes on staging instance.
Click "Push to live"
The staging instance is piushed to live and then two wp_cli commands are automatically run:
i) wp plugin activate plugin1 plugin2
ii) wp db query "SQL query to update plugin keys"
IP: --
Is it possible to automatically run some wp-cli commands after staging
Yes this is possible but you will need root access to the server to configure this.
You can do the above steps by using filters in Softaculous. Filters are PHP files which you can configure to execute your PHP function when a particular task is done in Softaculous. You can also execute shell commands using shell_exec or exec functions.