WordPress plugin

The official Moelleux plugin for WordPress installs the consent banner, displays your privacy policy and relays consent to other plugins — without touching your theme.

Installation

Two ways to install the Moelleux plugin.

From the WordPress.org directory (coming soon)

In your admin, go to Plugins → Add New, search for “Moelleux”, then click Install and Activate.

Manual installation

Upload the plugin zip file to wp-content/plugins/ (or via Plugins → Add New → Upload Plugin), then activate “Moelleux”.

Requirements: WordPress 6.2 or newer, PHP 7.4 or newer.

Configure the site key

Copy your site key (a UUID visible in the Moelleux dashboard) and paste it into Settings → Moelleux. The key is validated as a UUID v4.

For automated deployments, define the key instead via a PHP constant in wp-config.php (or the environment variable of the same name):

// wp-config.php
define( 'MOELLEUX_WP_SITE_KEY', '550e8400-e29b-41d4-a716-446655440000' );

When the MOELLEUX_WP_SITE_KEY constant (or environment variable) is set, it takes precedence and the admin field becomes read-only.

Display the policy

Display your Moelleux-generated privacy policy anywhere on your site, in one of three ways: the [moelleux_policy] shortcode, the “Moelleux Policy” Gutenberg block, or the Elementor widget (“Moelleux” category).

[moelleux_policy]

The shortcode inside a page or post.

Shared attributes

The shortcode, block and widget share the same attributes:

Attribute Description
jurisdiction Policy jurisdiction: qc-loi25 (default), ca-pipeda, us-ccpa, eu-gdpr, world. A missing or invalid value falls back to qc-loi25.
lang Language: fr or en. If absent, auto-detected (Polylang, then WPML, then the site language) — the same page in FR or EN shows the matching policy.
cache Fragment caching: yes (default) or no.
[moelleux_policy jurisdiction="eu-gdpr" lang="en"]

Example: GDPR policy in English.

The policy is fetched on the fly from the JSON fragment served by the Moelleux CDN, for the requested jurisdiction and language.

“Manage my cookies” button

The [moelleux_manage] shortcode inserts a button that reopens the preferences modal (equivalent to window.Moelleux.openPreferences()). Essential in a footer to stay compliant. An optional label attribute customizes the button text.

[moelleux_manage label="Gérer mes témoins"]

Example with a custom label.

Compatibility and tools

The plugin integrates cleanly with the WordPress ecosystem:

  • Automatic cache and optimization exclusions for WP Rocket, LiteSpeed Cache, Autoptimize and SG Optimizer, so the embed is never concatenated or deferred incorrectly.
  • Detection of competing CMPs and Google plugins, with a reminder about Consent Mode v2 where relevant.
  • WP-CLI commands: wp moelleux status, wp moelleux set-key, wp moelleux clear-key.
  • Site Health integration (Tools → Site Health) to diagnose the configuration.

What’s next

To drive consent from your own code (theme, another plugin), the window.Moelleux JavaScript API works exactly the same way on WordPress as on any other site.

See the client API →