Enhancement MainWP, remove non-mainwp actions through WP CLI

Hiya all,

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.

https://github.com/opicron/mainwp-cli-extension

## 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.

Robbert

4 Likes

@opicron1 Thank you very much for posting this for the community to consume. We all love to see our users enjoying one of the best things about MainWP - it’s ability to be customized.

I have updated the Categories for this post so that it’s easier to be found by others in the future.

3 Likes

Absolutely, the main reason (see what I did there) of choosing MainWP is customizability and self hosting. Well worth the lifetime fee. Thanks to the devs and community making this awesome managing tool.

I am working on another awesome addition, an woocommerce product importer to be compatible with MainWP. It is a few months off due to polishing though.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.