How To Mirror The WordPress Activity Logs To Slack

Search Knowledge Base by Keyword

You are here:

The WP Activity Log plugin can be integrated with Slack, allowing you to mirror your WordPress activity log to a Slack channel of your own choice.

The WordPress activity log in Slack

This document explains how you can do this. In short the process consists of three easy steps:

  1. Create an incoming webhook for Slack (this is done in Slack – more info)
  2. Set up a Slack connection in the plugin
  3. Configure the mirroring of the activity logs to Slack

Setting Up a Slack Connection for the Activity Log

To setup a Slack connection in the activity log plugin:

  1. Click on DB/Archive/Mirror node in the plugin menu.
  2. Click the Create a Connection button to launch the connection setup wizard.
  3. Select Slack from the Type of Connection drop down menu in the first step of the wizard.

Configuring the WordPress activity log integration with Slack

  1. In the second step of the wizard specify:
    • The name to be used in the Slack channel for all activity log events in the Bot Name placeholder,
    • The URL of the incoming WebHook in the WebHook URL placeholder. Refer to Slack’s documentation on how to create incoming WebHooks.
  2. In the last step of the wizard, specify a name for the connection. Connection names are just reference for you and can be up to 25 characters long and can only consist of letters, numbers and underscores.

Testing the Slack Connection

Once the connection is setup it will be listed in the Connections tab. Click the Test button to send a test message to the configured Slack channel via the plugin and confirm the configuration.

WP Activity Log plugin test message in Slack

Configuring Mirroring of the Activity Log to Slack

Once the Slack connection is setup you have to configure it as a mirroring connection by following the below instructions:

  1. Click on DB/Archive/Mirror in the plugin menu.
  2. Navigate to the Mirroring tab and click the Setup an Activity Log Mirror button.
  3. In the first step of the wizard specify a name for the mirror. Names are just for your reference and can be 25 characters long, and only consist of letters, numbers and underscores.
  4. Select the Slack connection you’ve just setup from the Connection drop down menu.

Configuring filters for the activity log and Slack integration

  1. In the second step of the wizard specify how often the activity log mirroring process should run.
  2. In the last step of the wizard you can configure activity log filtering rules for the mirroring connection. By default the connection is set to  Send all events option, though if you’d like to setup any filtering rules refer to configuring filtering rules for activity log mirroring connections.
  3. Click Save mirror to save the new mirroring process.

Other Integrations

Refer to the getting started guide for external databases & third party services for more information on other integrations and activity log management.