If you're a WordPress developer, chances are from time to time, you just want a…
Slack is a chat and collaboration platform used by teams large and small to facilitate organized communication. It integrates with just about every service on the web, like Dropbox or Stripe or Google Docs, and keeps all communication in one, easily searchable place. You’ve probably heard of it. And if you want a simple integration with WordPress, there’s a plugin for that.
What’s it Do?
The Slack WordPress plugin allows you to automatically send a notification to a Slack channel whenever a post’s status is updated, when a post is published, and when there’s a new comment. It does this by using incoming webhooks, which are easy to set up on the Slack side. And you can include as many integrations as you want right from the WordPress admin. That way, your team in Slack can stay updated on what is going on on your WordPress site.
How’s it Work?
First, install and activate the Slack plugin. Then, you will have to go over to your Slack dashboard, and click on the “Configure Integrations” link. This will take you to the Slack integrations page, of which there are many. Scroll down until your see the “Incoming Webhooks” integration and click the “Add” button. Choose the Slack Channel that you want to post your updates to. You might want to create a dedicated channel on Slack that receives updates about WordPress, or you can integrate it into an existing channel.
Once you set up the integration, you will be provided with a “Webhook URL”. You will need this for the plugin to work. You can go back to the WordPress admin, and go to Slack -> Add New. First, give the integration a name. This is really only for you, if you want to modify it in the future. Next, in the text field labeled “Service URL” copy and paste that Webhook URL from Slack. This will ensure the two are synced up. Then enter in the channel, #wordpress for instance, and name the bot that will do the posting. This name is what will be displayed in Slack as the user whenever something new is posted. You can also select an icon for the user. There is a whole list you can use, but you can leave it blank to keep it at it’s default.
The next step is to check off which “Events to Notify”. There are three options, when a post changes status, when a post is published, and when there is a new comment. You can check off all three, or any individual ones. Basically, these are the events which will trigger a notification in Slack. Last, make sure that the “Active” checkbox is checked, so that the integration begins working. When you’re finished, just click the “Save” button and your integration will be set up. So each time an event happens, it will be posted to Slack automatically.
You can set up as many integrations as you want, if you say, want to post to different channels for different events. Or, if you have multiple Slack groups to post to. Just note that you will have to set up a different Incoming Webhook for each separate integration.
Costs, Caveats, Etc.
Slack for WordPress is free, and fairly simple. I would definitely like to see this expand to different events, but for now it seems to work fine. There are also custom plugins for Easy Digital Downloads, Contact Form 7, Gravity Forms, and WooCommerce which add specialized events tailored to plugin. For instance, you can notify Slack whenever a new form is submitted, or whenever you receive a payment in WooCommerce. You can check out the plugin on GitHub, or post to the support forums if you are having problems. But GitHub issues are probably the best way to log a problem.