The most reliable way to integrate Discord with WordPress is by using the miniOrange WordPress Discord Integration plugin, which connects WordPress and Discord using OAuth2.0. This plugin enables secure Discord Single Sign-On (SSO), automatic role mapping, membership-based Discord role assignment, and seamless user onboarding into your Discord server.
Below are the complete steps to set up Discord SSO and full integration using the miniOrange WordPress Discord Integrator:
1. Install the miniOrange Discord Integration Plugin
- Log in to your WordPress admin dashboard
- Go to Plugins → Add New
- Search for miniOrange Discord Integration
- Click Install Now → Activate
This installs the plugin that will handle Discord SSO, role mapping, and server permissions.
2. Configure Discord as a Social Login Provider
- Open the Discord Developer Portal
- Click New Application and name it
- Go to OAuth2 → Redirects
- Add the redirect URL provided by the plugin
- Save changes
- Copy the Client ID and Client Secret
- Paste them into the plugin settings in WordPress
This step sets up Discord OAuth2.0 so users can log in using their Discord accounts.
3. Configure WordPress as an OAuth Client
- Go to the plugin’s App Settings
- Enter the Client ID, Client Secret, and scopes: identify + email + guilds + guilds.join
- Click Save & Test Configuration
You will see the user profile attributes returned from Discord, confirming that OAuth communication is successfully set up.
4. Configure a Discord Server, Bot, and Guild ID
- In the Developer Portal → Bot tab
- Click Add Bot
- Copy the Bot Token
a. Create a Bot & Get the Bot Token
- Go to OAuth2 → URL Generator
- Select required bot permissions
- Copy the generated URL
- Paste it in your browser and choose your Discord server
- Authorize the bot
- Make sure the bot's role is at the top of the server roles list
b. Add the Bot to Your Discord Server
- Enable Developer Mode in Discord
- Right-click your server name → Copy ID
c. Get Your Discord Guild ID
- Go to Discord Server Configuration in the plugin
- Paste Guild ID and Bot Token
d. Connect Bot to WordPress
This connects your WordPress site directly with your Discord server.
5. Enable “Connect with Discord” for Logged-In Users
This adds users to your Discord server after they log into your WordPress site.
- Open Link Social Account tab
- Enable Link Discord to logged-in user
Copy the shortcode & Add it to any WordPress page
[miniorange_discord_login link_enable="1"]
Now users can connect their WordPress profile with Discord in one click.
6. Map Discord Roles to WordPress Roles
This ensures that when users log in via Discord SSO, their WordPress role is assigned automatically based on their Discord role.
- Go to Discord → WordPress Role Mapping
- Enable the setting
- Map each Discord role to the appropriate WordPress role
- Save
7. Map WordPress Roles to Discord Roles
This assigns users a Discord role based on their WordPress role
- Open WordPress → Discord Role Mapping
- Enable the mapping
- Select which WordPress roles correspond to which Discord roles
- Save settings
8. Membership / Subscription-Based Role Mapping
If you use WooCommerce Memberships, WooCommerce Subscriptions, or Paid Memberships Pro, you can assign Discord roles automatically based on:
- Membership level
- Subscription plan
- Paid membership tier
Expired or cancelled memberships automatically remove the user's premium Discord role and apply the default Discord role.
Conclusion
Integrating Discord with WordPress is simple and powerful using the miniOrange WordPress Discord Integration plugin. By configuring Discord as a Social Login provider, setting up a Discord bot, and enabling role and membership mapping, you can offer seamless Discord SSO, automated role assignment, and secure server access. This setup ensures a consistent, automated user experience across both your WordPress site and Discord community—ideal for membership websites, gated communities, and subscription platforms.
To learn more about the product and explore its key features, visit the miniOrange WordPress OAuth SSO page.
If you have any questions or need assistance, feel free to contact us at oauthsupport@xecurify.com. We're happy to help!