How to Post WordPress Posts to Discord Automatically
You can post WordPress posts to Discord automatically by creating a webhook URL inside Discord, then connecting it to a WordPress automation workflow that fires on the “Post Published” trigger. The whole setup takes under 10 minutes, works on the free tier, and requires no custom code.
What most tutorials skip is what happens after the happy path: a webhook call that times out, a post that fires to the wrong channel, or a category you never wanted syndicated. This guide covers the full setup and those edge cases, so you have something that actually holds up in production.
We tested this in our own staging environment using WordPress 6.5 and a live Discord server with three channels. Everything below reflects what we saw on screen.
What You Need Before You Start
- A Discord server where you have Manage Webhooks permission on at least one channel.
- WordPress 6.2 or higher with PHP 7.4 or higher.
- An automation plugin that supports a Post Published trigger and an HTTP Request action. The free version of Krom Automation covers both out of the box.
- Five to ten minutes for the initial setup. Conditional logic and multi-channel routing add another five.
You do not need a Discord bot token for this approach. Webhooks are simpler, require no OAuth flow, and are sufficient for one-way notifications from WordPress to Discord. The bot-token approach adds complexity only when you need two-way interaction, such as reading Discord messages from WordPress, which is a different problem entirely.
Step 1: Create a Discord Webhook URL
Open Discord and go to the channel you want to receive WordPress posts. Click the gear icon next to the channel name to open Edit Channel. Navigate to Integrations, then Webhooks, and click New Webhook.
Give the webhook a name that makes its source obvious, something like “WordPress Blog Posts”. Copy the webhook URL to your clipboard.
It will look like https://discord.com/api/webhooks/[ID]/[TOKEN]. Store it somewhere safe; you will paste it into WordPress in the next step.
Discord’s official documentation covers webhook creation in detail. See the Discord webhook reference for the full field reference if you need to customise the payload later.
Step 2: Install Your Automation Plugin
In your WordPress admin, go to Plugins > Add New and search for “Krom Automation”. Install and activate it.
The plugin adds a Krom Automation menu item to your sidebar. No account creation is required and nothing is gated behind a paywall in the free version.
If you have never built a workflow before, the how Krom Automation works overview explains triggers, actions and the visual canvas in about three minutes of reading. For the installation steps themselves, see how to install Krom Automation on WordPress.
Step 3: Build the Workflow
Go to Krom Automation > Workflows > Add New. You will land on a drag-and-drop canvas. The workflow starts with a trigger node and you connect action nodes to it.
- Add the trigger: Click the trigger node and select Post Published from the Post category. This fires every time a post transitions to published status, including scheduled posts that go live at their scheduled time.
- Add the action: Click the plus icon below the trigger to add an action. Select HTTP Request from the Integration category.
- Configure the HTTP Request: Set the method to POST. Paste your Discord webhook URL into the URL field.
- Set the Content-Type header: Add a header with the key
Content-Typeand the valueapplication/json. Discord requires this for webhook payloads. - Write the request body: Paste the JSON below into the body field, using merge tags to inject real post data.
Here is the payload that produces a clean Discord notification with the post title and a direct link:
{
"content": "New post: **{{post_title}}** {{post_url}}"
}
Merge tags pull live data from the event that fired the trigger. {{post_title}} resolves to the actual title of the published post and {{post_url}} resolves to its permalink. For the full list of available variables, see the merge tags documentation.
Save the workflow and toggle it to Active.
Every other tutorial shows the webhook URL going in. None of them show what the payload looks like when it arrives in Discord, which is the part that determines whether anyone actually reads it.
Step 4: Test Before You Go Live
Before you publish a real post, use the built-in workflow simulator to run a dry test with zero side effects. Open the workflow, click Simulate, and choose a recent post as the sample data. The simulator walks through each node and shows you exactly what payload would be sent to Discord, without actually sending it.
See the testing workflows with the simulator documentation for the full walkthrough. Once the simulation looks right, publish a draft post and watch your Discord channel for the notification. It should arrive within a few seconds on a standard host.
Conditional Logic: Post Only Specific Categories
The basic workflow fires for every published post. If you run a site with ten post types or twenty categories, you almost certainly do not want all of them going to Discord. Here is how to add a filter.
Between the trigger and the HTTP Request action, add a Condition node. Conditions create a Yes path and a No path. Set the condition to check whether the post category equals the category you want to syndicate, for example “News” or “Product Updates”.
Connect the HTTP Request to the Yes path only. Posts in other categories reach the No path and exit the workflow without sending anything.
You can stack multiple conditions to route different categories to different Discord channels. Each channel needs its own webhook URL and each path gets its own HTTP Request action with the matching URL. The conditions and branching documentation shows how to build multi-path workflows step by step.
For the visual canvas itself, the visual workflow builder guide explains how to connect nodes, navigate the canvas, and rearrange your layout as the workflow grows.
Failure Handling: What Happens When the Webhook Call Fails
This is the section no other guide covers. Discord webhooks return a non-200 status code for several real-world reasons: the webhook was deleted from the Discord server, the server is temporarily unavailable, or your host’s outbound HTTP is blocked on certain ports. Without failure handling, you lose the notification silently and never know.
Krom Automation handles this in two ways. First, failed executions are logged in the execution history with a full per-step audit trail, so you can see which workflow step failed and what error code Discord returned. Second, the plugin sends an email notification to the site admin when an execution fails, and retries automatically with configurable backoff.
| Failure scenario | What you see | What to do |
|---|---|---|
| Discord webhook was deleted | HTTP 404 in execution log | Generate a new webhook URL in Discord and update the workflow |
| Incorrect Content-Type header | HTTP 400, Discord returns “Invalid JSON” | Confirm the header is set to application/json exactly |
| Rate limit hit (Discord allows 30 requests per 60 seconds per webhook) | HTTP 429, retry-after header present | Add a delay node before the HTTP Request to space out bulk publishes |
| Host blocks outbound HTTP on port 443 | cURL error or timeout in execution log | Contact your host; most managed WordPress hosts allow outbound HTTPS by default |
| Malformed merge tag in the payload | HTTP 400 or empty field in Discord message | Run the simulator first to preview the resolved payload before activating |
The send a webhook when a WordPress post is published post goes deeper on the HTTP Request action and payload structure if you want to build a richer embed rather than a plain text message.
Silent failures are the worst kind. A workflow that fails 20 percent of the time looks identical to a working one until you check the execution log. That log is the reason execution history matters more than the feature list suggests.
Richer Discord Embeds vs. Plain Text Messages
The basic payload sends a plain text line. Discord also supports rich embeds with a title, description, URL, thumbnail image and colour strip. To use an embed, change the payload body to this structure:
{
"embeds": [{
"title": "{{post_title}}",
"url": "{{post_url}}",
"description": "{{post_excerpt}}",
"color": 5814783
}]
}
The color field accepts a decimal integer. The value 5814783 is a mid-blue.
Convert any hex colour to decimal before inserting it. The {{post_excerpt}} merge tag pulls the post excerpt, which you can set manually in the WordPress post editor or leave blank to let WordPress auto-generate one from the first paragraph.
Keep the embed description under 200 characters. Discord truncates longer descriptions in the channel preview, which makes the notification harder to read at a glance.
Webhook-Only vs. Bot Token: Which Should You Use?
| Dimension | Webhook approach | Bot token approach |
|---|---|---|
| Setup time | Under 10 minutes | 30 to 60 minutes including Discord Developer Portal registration |
| Direction | WordPress to Discord only (one-way) | Both directions, bot can read and write |
| Permissions required | Manage Webhooks on one channel | Bot must be invited to the server with specific permission scopes |
| Rate limit | 30 requests per 60 seconds per webhook | 50 requests per second globally, per bot |
| Maintenance burden | Low. Webhook URL is static until deleted. | Medium. Bot token must be rotated if compromised. |
| Suitable for | Publishing notifications, content alerts | Interactive commands, two-way sync, moderation bots |
For the use case in this article, publishing a WordPress post to a Discord channel, the webhook approach is correct. It is simpler, requires fewer permissions, and there is no token to manage. The bot token approach is worth the extra complexity only when you need Discord to do something back toward your WordPress site.
Does This Work for WooCommerce Products?
Yes. The free version of the plugin includes both an Order Created trigger and an Order Completed trigger. You can notify a Discord channel whenever a WooCommerce order comes in, with the order total and customer name in the payload, using exactly the same HTTP Request action and the same webhook setup described above.
For product-level events, such as notifying a Discord channel when a product goes back in stock or when a subscription renews, those require Pro triggers. The WooCommerce Subscriptions integration documentation lists the available triggers and what data each one exposes as merge tags.
If you also send post notifications to Slack, the same workflow pattern applies. The messaging integrations overview covers Discord, Slack, Twilio and Telegram side by side.
Timing: How Fast Does a Post Appear in Discord?
On a standard shared host with WP-Cron running normally, the notification reaches Discord within 2 to 5 seconds of publish. The HTTP Request action runs in the background via Action Scheduler, so the publish action itself is not blocked or slowed down.
On very low-traffic sites where WP-Cron only fires when a visitor loads a page, there can be a delay if no one visits the site for several minutes after publishing. The fix is to disable WP-Cron’s default behaviour and run it as a real server cron job instead.
The WordPress developer documentation on hooking WP-Cron into the system task scheduler covers this setup. This is worth doing on any site where timing reliability matters.
Also Worth Knowing About
Pollify is wpRigel’s poll, survey and quiz plugin for WordPress. It builds natively inside the block editor as real Gutenberg blocks, so there are no shortcodes to paste and no separate interface to configure. It is worth knowing about if you gather community feedback on the same site you are syndicating to Discord.
Commandify is a command palette for the WordPress admin. Press Cmd or Ctrl plus K to search content, jump to any settings screen, and run admin actions without clicking through menus. It is the only WordPress command palette with real WooCommerce order, product and customer commands built in.
Frequently Asked Questions
Is there a free way to auto-post WordPress posts to Discord without a paid plugin?
Yes. The free version of Krom Automation includes the Post Published trigger and the HTTP Request action, which is everything you need for this setup.
There is no run cap, no trial period, and nothing behind a paywall in the free version. Download it free from the WordPress.org plugin directory.
How do I post only specific categories from WordPress to Discord?
Add a Condition node between the Post Published trigger and the HTTP Request action. Set the condition to check the post category and connect the HTTP Request to the Yes path only. Posts in other categories exit the workflow without triggering the webhook call.
Why is my WordPress post not showing up in Discord after I publish?
Check the execution log in Krom Automation first. The most common causes are a deleted or incorrect webhook URL (Discord returns 404), a missing Content-Type header (Discord returns 400), or a WP-Cron delay on low-traffic sites. The execution log shows the exact HTTP status code Discord returned, which narrows the problem immediately.
Can I send posts to multiple Discord channels?
Yes. Add separate HTTP Request action nodes for each channel, each with its own webhook URL. Use Condition nodes to route different post categories to different channels, or duplicate the HTTP Request action to send the same post to two channels simultaneously.
Does this work with scheduled posts or only with immediately published posts?
Both. The Post Published trigger fires whenever a post transitions to published status, including scheduled posts that go live at their set time. There is no separate trigger needed for scheduled content.
If you also notify subscribers by email when a post goes live, the email subscribers when a new WordPress post is published post shows how to combine both notifications in a single workflow using parallel action nodes.