WordPress Webhooks: Developer Guide 2026

Published April 21, 2026

WordPress Webhooks Guide

Webhooks let WordPress notify external systems in real time when something happens — a form is submitted, a post is published, or an order is placed. Unlike polling (repeatedly asking "did anything happen?"), webhooks push data instantly and efficiently.

How WordPress Webhooks Work

When a WordPress event fires (using an action hook), your webhook handler sends an HTTP POST request to a predefined URL with event data as JSON. The receiving endpoint processes the data and returns a 200 response.

Sending Webhooks from WordPress

Using the WP Webhooks plugin:

  1. Install and activate WP Webhooks
  2. Go to WP Webhooks → Send Data → Add Webhook URL
  3. Select the trigger event (post published, form submitted, user registered, WooCommerce order, etc.)
  4. Paste your target URL (n8n, Zapier, Make, or your own endpoint)

Receiving Webhooks in WordPress

WP Webhooks also handles incoming webhooks — receive data from external systems and trigger WordPress actions. Use this to sync CRM contacts to WordPress users, update post metadata from external tools, or trigger WP-CLI commands remotely.

Custom Webhook Implementation

For developers, use wp_remote_post() inside WordPress action hooks:

add_action('publish_post', function($post_id) {
  wp_remote_post('https://your-endpoint.com/webhook', [
    'body' => json_encode(['post_id' => $post_id]),
    'headers' => ['Content-Type' => 'application/json'],
  ]);
});

Security

Always validate incoming webhooks with a shared secret. For outgoing, use HTTPS endpoints only and include a signature header your receiver can verify.