Learn

WordPress cookies: what WordPress, WooCommerce and Jetpack set

WordPress itself sets few cookies, and its documentation lists none for a visitor who only reads a page. Most of the cookies on a WordPress site come from WooCommerce, Jetpack and the tracking tags plugins add. This guide lists them, with the official source for each, and explains which ones need the visitor's consent.

To see the cookies your own site sets, run the free WordPress check.

Check my WordPress site

The cookies WordPress itself sets

WordPress sets cookies for people who log in and for people who leave a comment. Its documentation lists none for a visitor who only reads your pages. If a reader gets cookies on your site, they come from a plugin, the theme or a tag you added.

CookieWho gets itWhat it is for
wordpress_[hash] (wordpress_sec_[hash] on HTTPS)Logged-in users, in /wp-admin/Keeps you signed in to the dashboard.
wordpress_logged_in_[hash]Logged-in usersSays you are logged in, for the rest of the site.
wp-settings-[UID], wp-settings-time-[UID]Logged-in usersRemembers how you set up the dashboard.
comment_author_[hash] and _email_, _url_People who leave a commentFills in the comment form next time. Kept a little under a year.
wordpress_test_cookieAt sign-inChecks that the browser accepts cookies.
wp_langAt sign-inRemembers the language chosen on the login screen.

Source: WordPress cookies, developer.wordpress.org

WooCommerce

A store needs a few cookies to keep the cart. WooCommerce also has an order attribution feature that stores where each visitor came from in cookies whose names start with sbjs_, and shows that source on the order. It is switched on or off under WooCommerce > Settings > Advanced > Features, and WooCommerce says it works with the WP Consent API, so a compatible banner plugin can hold it until the visitor agrees.

CookieWho gets itWhat it is for
woocommerce_cart_hashShoppers with a cartTells WooCommerce the cart changed.
woocommerce_items_in_cartShoppers with a cartSays whether the cart has items.
wp_woocommerce_session_[hash]ShoppersLinks the visitor to their cart for 2 days.
woocommerce_recently_viewedIf the widget is usedPowers the Recently Viewed Products widget.
store_notice[id]Visitors who close a store noticeKeeps the notice closed.
sbjs_session, sbjs_first, sbjs_current, sbjs_udata and othersVisitors, with order attribution onRecords where the visitor came from, so an order can show its source.

Source: WooCommerce cookies

Source: WooCommerce order attribution

Jetpack

Jetpack says it sets cookies only when someone uses one of its features or the dashboard. These are the main ones a visitor can get on the public site:

CookieWhenWhat it is for
tk_ai, tk_qsVisitors, only with Jetpack Instant Search or WooCommerce AnalyticsAnonymous ID and queries for Jetpack's own analytics.
eucookielawIf the Cookies & Consents Banner widget is usedRemembers that the visitor accepted cookies.
personalized-ads-consent, usprivacy, ccpa_appliesOnly on sites running Jetpack AdsAd consent and the California opt-out.

Source: Jetpack cookies

The cookies tracking plugins add

On most WordPress sites the cookies that matter for consent are not WordPress's. They belong to Google, Meta and other services, and arrive with the tag a plugin or a snippet puts in the page:

CookieServiceWhat it is for
_ga, _ga_[ID]Google AnalyticsSite Kit, MonsterInsights, GTM4WP or a pasted Google tag.
_gcl_auGoogle AdsThe Google tag with Ads conversion tracking.
_fbpMeta PixelPixelYourSite, Meta for WooCommerce or a pasted pixel.
_clck, _clskMicrosoft ClarityThe Clarity plugin or a pasted tag.
_hjSessionUser_[ID], _hjSession_[ID]HotjarThe Hotjar plugin or a pasted tag.

To find out which plugin adds each one, see which WordPress plugin adds a tracker.

Under the EU ePrivacy rules (PECR in the UK), cookies a site needs to do what the visitor asked for, such as staying logged in or keeping a cart, do not need consent. Advertising cookies need it, and analytics cookies usually do; some countries allow narrow exemptions for basic audience measurement. Order attribution and Jetpack's analytics cookies are worth reviewing with the same eye. US state laws mostly ask for a way to opt out of selling or sharing instead.

This is a practical summary for an audit, not legal advice. Your banner should list the cookies your site actually sets, which is why it is worth checking them rather than copying a list.

See the cookies on your own site

  1. Open your site in a private window and do not answer the cookie banner.
  2. Open the developer tools, then Application (Chrome) or Storage (Firefox), then Cookies.
  3. Apart from the cart cookies and your banner's own cookie, anything listed was set before consent. sbjs_ cookies here mean order attribution is not waiting for consent.

Or run the free WordPress check, which lists the trackers and cookies your page loads.

See the cookies your WordPress site sets

The free check lists the cookies and trackers your page loads, with no account and nothing to install.

Check my WordPress site