I am using Cloudways Safeupdates to update our websites automatically. Due to this approach the Non-MainWP actions list fills up immensely over time.
I do not like to manually go over these lists to remove them as Cloudways Safeupdates assures correct updates. So I needed a way to remove them through a scheduled cronjob.
Thus I wrote a small MainWP CLI extension, please find the github below. I extended the class of MainWP CLI interface so it is in line with existing implementation.
## NAME wp mainwp delete_actions ## DESCRIPTION remove non-mainwp actions from child sites ## SYNOPSIS wp mainwp delete_actions [<websiteid>] [--all] ## OPTIONS [<websiteid>] The id (or ids, comma separated) of the child sites that need to be synced. [--all] If set, non-mainwp actions from all child sites will be removed ## EXAMPLES wp mainwp delete_action 2,5 wp mainwp delete_action --all
Maybe this can be put in MainWP itself or at least be of use to someone else.