WordPressPlatform Configuration
Discord
Configure Discord in the FoPost WordPress plugin.
Discord
Configure the OwlStack WordPress plugin to publish posts to your Discord server channels.
Prerequisites
You can connect Discord using either a webhook (simpler) or a bot (more flexible).
Option A: Webhook (Recommended)
Creating a Discord Webhook
- Open your Discord server and go to the target channel
- Click the gear icon to open Channel Settings
- Go to Integrations > Webhooks
- Click New Webhook
- Name it (e.g., "OwlStack") and copy the Webhook URL
Option B: Bot
Creating a Discord Bot
- Go to the Discord Developer Portal
- Create a new application
- Go to Bot and click Add Bot
- Copy the Bot Token
- Under OAuth2 > URL Generator, select
botscope withSend Messagespermission - Use the generated URL to invite the bot to your server
- Copy the Channel ID (enable Developer Mode in Discord settings, then right-click the channel)
Settings
Navigate to OwlStack > Discord in the WordPress admin.
| Field | Description |
|---|---|
| Webhook URL | Discord webhook URL (for webhook mode) |
| Bot Token | Discord bot token (for bot mode) |
| Channel ID | Target channel ID (required for bot mode) |
Webhook vs. Bot
Use Webhook mode for simple publishing to a single channel. Use Bot mode if you need to publish to multiple channels or require richer interactions.
Step-by-step (Webhook)
- Go to OwlStack > Discord in your WordPress admin
- Paste your Webhook URL
- Click Save Settings
Step-by-step (Bot)
- Go to OwlStack > Discord in your WordPress admin
- Paste your Bot Token
- Enter the Channel ID
- Click Save Settings
Testing
After saving your settings:
- Click Test Connection to verify your webhook URL or bot token
- Click Send Test Message to publish a test message
- Check your Discord channel to confirm the message appeared
Publishing
Once configured, Discord appears as a toggle in the OwlStack meta box on post edit screens.
Programmatic publishing
// Simple message
owlstack()->discord('Hello from WordPress!');
// Message with embed
owlstack()->discord('New blog post published!', [
'type' => 'embed',
'title' => 'My Post Title',
'url' => 'https://example.com/post',
]);Constraints
| Constraint | Value |
|---|---|
| Max message length | 2,000 characters |
| Max embed description | 4,096 characters |
| Max file size | 25 MB (50 MB with Nitro) |
| Supported media types | JPEG, PNG, GIF, MP4, WebM |
Troubleshooting
| Issue | Solution |
|---|---|
| "Unknown Webhook" | The webhook may have been deleted; create a new one |
| "Missing Access" | Ensure the bot has Send Messages permission in the channel |
| "Invalid token" | Double-check the Bot Token from the Developer Portal |
| Messages not appearing | Verify the Channel ID is correct (right-click channel with Developer Mode on) |