A lightweight, self-contained GDPR cookie consent banner for WordPress: no external service, no subscription, vanilla JavaScript without jQuery. It is the WordPress version of our Magento 2 cookie banner.
Compatibility: WordPress 6.0+ · PHP 8.1 – 8.4 License: free · Current version: see Releases
- Three consent categories: Necessary (always on), Statistics and Marketing, with Accept all, Reject, Customize and Save preferences buttons.
- Consent stored in a first-party cookie (
tc_cookie_consent, versioned, about six months,SameSite=Lax,Secureon HTTPS). No cookie is set before the visitor chooses. - Prior blocking of third-party scripts until consent is given.
- Optional Google Consent Mode v2:
analytics_storage,ad_storage,ad_user_dataandad_personalizationdenied by default and updated on choice. - Third-party embeds blocked (YouTube, Vimeo, Google Maps, Facebook, Instagram, TikTok, Twitch, Spotify, SoundCloud): a placeholder with an "Accept and show" button replaces them until marketing consent.
- Reopen the preferences from anywhere:
[tc_cookie_settings]shortcode,#cookie-preferenceslink, adata-cookie-settingselement orwindow.TcCookieConsent.open(). - Page cache friendly (LiteSpeed, WP Super Cache...): the page is the same for everyone, the choice lives only in the cookie read by the browser.
- Automatic cookie scanner: every night the plugin visits the home page and the pages you list like a new visitor and reads the cookies set by the server (HttpOnly too); the banner also reports the names of the cookies found in the browser. A dictionary classifies the common ones.
- Optional consent log to prove consent (GDPR art. 7.1), with a filterable list and CSV export.
- Translated cookie policy link with WPML or Polylang. Accessible dialog (focus management,
Esc, visible focus, reduced motion). Translatable texts, English included.
- WordPress 6.0 or newer
- PHP 8.1 – 8.4
The plugin is free. Get the zip from the product page (free order, then download it from My Account), then in WordPress go to Plugins → Add New → Upload Plugin, upload the zip and activate it.
WordPress admin → Settings → Cookie Banner: privacy and cookie policy pages, embed blocking, main color, position, Google Consent Mode v2, consent cookie name, duration and version (raise it to ask everybody again), cookie list and scanner. Scan results are in Settings → Detected cookies.
- Product page and download: threecommerce.it/cookie-banner-gdpr-wordpress
- Changelog (in Italian)
- Support and custom development: threecommerce.it/contatti
This repository is the public showcase of the plugin. The source code is kept in a private repository.




