DEV Community

Cover image for Init Pulse For Discord – Fast, Minimal Discord Notifications for WordPress
Hao Nguyen
Hao Nguyen

Posted on

Init Pulse For Discord – Fast, Minimal Discord Notifications for WordPress

Init Pulse For Discord is a lightweight, backend-only Discord notification plugin for WordPress. It sends post publish and update notifications directly to Discord through webhooks — with rich embeds, role mentions, per-category/tag routing, and optional hot-post milestone alerts.

No external SDKs. No frontend JavaScript. No unnecessary database tables.

Just WordPress hooks, Discord webhooks, and a clean notification pipeline.


Why Init Pulse For Discord?

Keeping a Discord community informed about new WordPress content usually means connecting several systems together or relying on a large automation platform.

Init Pulse For Discord takes a much simpler approach.

Connect a Discord webhook, choose which post types to monitor, and WordPress can automatically notify your Discord server whenever tracked content is published or updated.

But it goes further than a basic "new post" webhook.

You can route specific categories and tags to their own Discord channels, mention specific Discord roles, customize webhook identities, send rich embeds, and trigger separate alerts when a post reaches a view milestone.

Everything runs server-side with no frontend assets and no external SDK dependencies.

It's part of the Init Plugin Suite — following the same minimalist, performance-first philosophy as the rest of the suite.


Features at a Glance

Automatic WordPress Notifications

  • Send notifications when content is published
  • Optionally notify Discord when content is updated
  • Select exactly which post types should trigger notifications
  • Works with standard posts, pages, products, and Custom Post Types
  • Markdown-ready message templates
  • Placeholder-based dynamic content

Supported placeholders include:

{title}
{title_url}
{url}
{excerpt}
{site_name}
{author}
{categories}
{tags}
{post_type}
{date}
Enter fullscreen mode Exit fullscreen mode

This makes the plugin useful for blogs, news sites, editorial platforms, communities, WooCommerce stores, and custom WordPress applications.

Rich Discord Embeds

Notifications can be delivered as formatted Discord embeds containing:

  • Title
  • Description
  • Accent color
  • Footer
  • Timestamp
  • Optional featured image

Prefer something simpler?

You can switch to plain-text messages with the Rich Embed toggle.

Role-Aware Mentions

Assign Discord Role IDs directly to WordPress categories or tags.

When content matching those terms is published or updated, Init Pulse For Discord can include the configured role mention in the notification.

This is useful for communities where different Discord roles follow different topics.

For example:

WordPress category: Development
Discord role: <@&123456789012345678>

WordPress category: News
Discord role: <@&987654321098765432>
Enter fullscreen mode Exit fullscreen mode

Your WordPress taxonomy becomes a simple routing and notification layer for Discord.

Per-Category / Tag Webhooks

Different types of content often belong in different Discord channels.

Init Pulse For Discord lets any Category or Tag have its own Discord Webhook URL.

For each term, you can configure:

  • Discord Webhook URL
  • Username override
  • Avatar override
  • "Only send to this webhook" behavior

By default, a matching post is delivered to both the term-specific webhook and the global webhook.

Enable Only send to this webhook to skip the global destination completely.

If a post belongs to multiple categories or tags with dedicated webhooks, the plugin sends to every unique destination while deduplicating repeated webhook URLs.

                WordPress Post
                      │
          ┌───────────┴───────────┐
          │                       │
     Category: Dev           Tag: WordPress
          │                       │
      Webhook A                Webhook B
          │                       │
          └───────────┬───────────┘
                      ↓
              Discord Channels
Enter fullscreen mode Exit fullscreen mode

The same routing logic applies to publish/update notifications and Hot Post Milestones.

Hot Post Milestones

Connect Init View Count and turn view counts into Discord notifications.

For example:

1,000 views
5,000 views
10,000 views
50,000 views
100,000 views
Enter fullscreen mode Exit fullscreen mode

When a tracked post crosses one of those thresholds, Discord receives a dedicated milestone notification.

Each milestone is sent once per post.

If a post jumps over several thresholds at once, only the highest milestone reached is sent.

Hot Post Milestones have their own message template with:

{views}
{views_short}
{milestone}
Enter fullscreen mode Exit fullscreen mode

For example:

🎉 This post just reached {milestone} views!

Current views: {views_short}
Enter fullscreen mode Exit fullscreen mode

The feature is completely optional. If Init View Count is not active, the setting simply remains dormant without affecting the rest of the plugin.

Install Init View Count later and the feature starts working automatically — no re-save required.

Delivery Troubleshooting

A lightweight Delivery Log keeps a rolling snapshot of recent webhook deliveries.

Each entry records whether a notification succeeded or failed.

When a post is routed to several destinations, each webhook gets its own delivery-log entry.

The log is stored lightly in wp_options with autoload = no, keeping it out of the normal frontend autoload path.

Built for Performance

  • Backend-only implementation
  • No frontend JavaScript
  • No frontend CSS
  • No external SDKs
  • No external Discord API client libraries
  • Lightweight WordPress options storage
  • Timeout and retry handling
  • Discord 429 Retry-After support
  • Safe-by-default hook integration

Core Modules

Module What it does
Publish Notifications Sends Discord alerts when tracked content is published
Update Notifications Optionally notifies Discord when tracked content is updated
Custom Post Types Choose exactly which post types trigger notifications
Rich Embeds Send formatted Discord embeds with title, description, color, footer, timestamp, and image
Plain Text Mode Send simple Markdown-ready text instead of an embed
Role Mentions Map WordPress categories/tags to Discord Role IDs
Per-Term Webhooks Route categories/tags to dedicated Discord destinations
Webhook Identity Override Username and Avatar per destination
Global Webhook Default Discord destination for notifications
Hot Post Milestones Notify Discord when Init View Count thresholds are crossed
Delivery Log Track recent success/error results per destination
Test Message Verify a webhook directly from the settings screen
Retry Engine Retry failed requests and respect Discord rate-limit responses

How It Works

The notification flow is intentionally simple.

WordPress content changes
        ↓
Post type is checked
        ↓
Publish / update context is resolved
        ↓
Categories and tags are inspected
        ↓
Role mentions are resolved
        ↓
Webhook destinations are resolved
        ↓
Duplicate webhook URLs are removed
        ↓
Discord payload is generated
        ↓
Webhook request is sent
        ↓
Delivery result is logged
Enter fullscreen mode Exit fullscreen mode

For a normal publish/update notification:

  1. WordPress fires the relevant content hook.
  2. Init Pulse For Discord checks whether the post type is enabled.
  3. The plugin builds the notification using the configured template.
  4. Categories and tags are inspected for Discord Role IDs and dedicated webhooks.
  5. Global and per-term destinations are resolved according to the routing rules.
  6. Duplicate webhook URLs are deduplicated.
  7. The final payload is sent to each destination.
  8. Delivery results are recorded in the lightweight Delivery Log.

The Hot Post Milestones flow is similar, but uses view-count thresholds from Init View Count.

Post view count changes
        ↓
Milestone thresholds checked
        ↓
Already notified?
   ┌────┴────┐
   │         │
  YES        NO
   │         │
  Skip    Build alert
             ↓
      Resolve webhooks
             ↓
        Send to Discord
             ↓
       Mark milestone sent
Enter fullscreen mode Exit fullscreen mode

No polling service or external scheduler is required for the normal notification flow.


Message Templates

The notification template is fully customizable.

Available placeholders:

Placeholder Description
{title} Post title
{title_url} Post title with its URL
{url} Post permalink
{excerpt} Post excerpt
{site_name} WordPress site name
{author} Post author
{categories} Post categories
{tags} Post tags
{post_type} WordPress post type
{date} Publication/update date

A simple template could look like:

```markdown id="qjz8z2"

{title}

{excerpt}

Read more: {url}

Site: {site_name}
Author: {author}




The same global message formatting is reused across all resolved destinations.

Per-term webhook routing changes **where** the notification goes and can optionally change the webhook identity, but the content and embed configuration remain shared.

---

### Hot Post Milestones

The optional Hot Post Milestones feature is built around [Init View Count](https://wordpress.org/plugins/init-view-count/).

Configure thresholds such as:



```plaintext
1000, 5000, 10000, 50000, 100000
Enter fullscreen mode Exit fullscreen mode

Then define a separate milestone template:

```markdown id="c9m4ea"

Hot Post Alert

{title} just reached {milestone} views.

Current views: {views_short}
URL: {url}




Supported milestone-specific placeholders:

| Placeholder     | Description                                 |
| --------------- | ------------------------------------------- |
| `{views}`       | Total view count, formatted with separators |
| `{views_short}` | Abbreviated view count such as `12.3K`      |
| `{milestone}`   | Threshold that was just crossed             |

Each milestone is sent once per post.

A post that jumps from 900 views to 12,000 views in one operation will not generate multiple Discord messages. The plugin sends only the highest milestone reached in that jump.

The same category/tag webhook routing used by publish/update notifications also applies to milestone alerts.

---

### Per-Category / Tag Webhook Routing

Per-term routing requires no custom code.

Open:



```plaintext
Posts → Categories → Edit
Posts → Tags → Edit
Enter fullscreen mode Exit fullscreen mode

Then configure the Discord webhook fields for the term.

A term can have:

Discord Webhook URL
Username
Avatar URL
Only send to this webhook
Enter fullscreen mode Exit fullscreen mode

The routing rules are straightforward:

No term webhook
    ↓
Global webhook only

Term webhook
    ↓
Term webhook + global webhook

"Only send to this webhook"
    ↓
Term webhook only
Enter fullscreen mode Exit fullscreen mode

When several matching terms have dedicated webhooks, every unique webhook receives the notification once.

For example, if both Development and WordPress point to the same Discord webhook URL, that URL is still called only once for the post.


Developer Hooks

Init Pulse For Discord provides filters for developers who need to modify outgoing Discord payloads without editing plugin source code.

Modify the final publish/update payload:

```php id="1s0a4c"
add_filter( 'init_plugin_suite_pulse_for_discord_payload', function( $payload, $post_id, $context ) {
$payload['content'] .= "\n— Sent from my custom filter";

return $payload;
Enter fullscreen mode Exit fullscreen mode

}, 10, 3 );




This filter runs once per post before the payload is dispatched to the resolved destinations, so the modification applies to the global webhook and per-term webhooks alike.

Webhook `username` and `avatar_url` overrides are resolved per destination afterward.

For Hot Post Milestones, use:



```php id="v4y4cg"
add_filter( 'init_plugin_suite_pulse_for_discord_milestone_payload', function( $payload, $post_id, $views, $milestone ) {
    $payload['content'] .= "\nMilestone: {$milestone} views!";

    return $payload;
}, 10, 4 );
Enter fullscreen mode Exit fullscreen mode

This gives developers a simple extension point for adding custom content, mentions, metadata, or application-specific information to the final Discord payload.


Webhook Delivery

The plugin keeps webhook delivery deliberately lightweight.

It includes:

  • Configurable request timeout
  • Retry handling
  • Discord rate-limit support
  • 429 Retry-After handling
  • Success/error delivery logging
  • Separate delivery records for multiple destinations

There is no Discord SDK to install and no external package manager dependency.

The plugin communicates with Discord through its standard webhook endpoint.


Settings

Navigate to:

Settings → Init Pulse For Discord
Enter fullscreen mode Exit fullscreen mode

Available settings include:

  • Post Types — select which post types trigger notifications
  • Webhook URL — global Discord webhook destination
  • Send Test Message — verify the webhook immediately
  • Bot Username — global webhook username
  • Avatar URL — global webhook avatar
  • Include Featured Image — add the post thumbnail to the embed
  • Use Rich Embed — switch between embed and plain-text output
  • Embed Color — customize the Discord embed accent
  • Timeout / Retries — configure webhook delivery behavior
  • Message Template — Markdown-ready publish/update template
  • Notify on View Milestones — enable Hot Post Milestone alerts
  • View Milestones — configure thresholds such as 1000, 5000, 10000
  • Milestone Message Template — separate template for view milestones

The settings screen also contains the Delivery Log for recent webhook results.

Role IDs and per-term webhook destinations are configured directly on individual categories and tags.


Installation

Install from WordPress.org or manually upload the plugin to:

/wp-content/plugins/
Enter fullscreen mode Exit fullscreen mode

Then:

  1. Activate Init Pulse For Discord
  2. Go to Settings → Init Pulse For Discord
  3. Paste your Discord webhook URL
  4. Click Send Test Message
  5. Choose which post types should trigger notifications
  6. Optionally assign Discord Role IDs to categories or tags
  7. Optionally configure dedicated webhooks for categories or tags
  8. Optionally install Init View Count and enable Hot Post Milestones

That's it.

Publish a tracked post and Discord receives the notification through your configured webhook destination.


Safe by Default

Init Pulse For Discord does not attempt to take over WordPress publishing behavior.

It listens to the relevant WordPress hooks and sends notifications when configured conditions are met.

Optional features remain optional:

  • Update notifications
  • Role mentions
  • Per-category/tag webhooks
  • Hot Post Milestones
  • Featured images
  • Rich embeds

Nothing extra is silently enabled just because another plugin happens to be installed.

For example, Init View Count integration remains dormant until you explicitly enable Notify on View Milestones.


Where Data Lives

Init Pulse For Discord keeps its storage footprint intentionally small.

  • Delivery history is stored in wp_options
  • Delivery logs use autoload = no
  • No custom database tables
  • No external notification database
  • No frontend storage
  • No per-page frontend assets

The goal is simple: keep the plugin focused on webhook delivery rather than turning notifications into another subsystem your WordPress database has to carry around.


Part of the Init Plugin Suite

Init Pulse For Discord is part of the Init Plugin Suite — a collection of lightweight, performance-focused WordPress plugins built for developers and creators who prefer clean implementations over feature-heavy stacks.

WordPress publishes.

Init Pulse routes the pulse.

Discord gets the message.


Thanks for reading. Got feedback or questions?

→ WordPress.org
→ GitHub

Top comments (0)