SameSite Cookies icon
Analytics & Tracking

SameSite Cookies

CSRF-protection for authentication cookies. When enabled, this plugin makes sure the "SameSite" flag is set in authentication cookies.

Developer Ayesh Karunaratne
16 Needs attentionmaintenance
  • 9 yearson WordPress.org
  • 7plugins
  • 5,200+installs in total
  • 4.0★avg. rating (27)
  • 0%of plugins updated this year
3/14 badges Profile →

Not recommended for new sites

Is SameSite Cookies still safe to use?

  • Problem: Not maintained Last updated 3 years ago (version 2.1).
  • Problem: Not tested with recent WordPress Tested up to WordPress 6.3; the current release is 7.1. Needs PHP 7.0+.
  • Problem: Poorly rated Rated 2.5/5 by 11 users on WordPress.org.
  • Note: Small user base Active on 700+ sites.

For a new site, or if you are planning a rebuild, choose a plugin that is still maintained. Unmaintained plugins stop getting security fixes and tend to break as WordPress and PHP move on.

No maintained plugin does exactly the same job. We checked the directory for an actively updated, well-rated plugin with the same features and didn't find a safe match.

If your site depends on SameSite Cookies, we can update it for current WordPress and PHP versions, review it for security problems, or rebuild the feature you need.

Get it updated Check all your plugins Browse maintained Analytics & Tracking plugins

Overview

SameSite Cookies describes itself as: “CSRF-protection for authentication cookies. When enabled, this plugin makes sure the "SameSite" flag is set in authentication cookies.”

It is active on 700+ WordPress sites and rated 2.5 out of 5 by 11 users on WordPress.org. Developers can extend it through 2 actions and 4 filters, listed below.

We haven't published a hands-on review of SameSite Cookies yet. Want one, or need help with it? Send us a request.

How to install SameSite Cookies

  1. Open the plugin installer. In your WordPress dashboard go to Plugins → Add New Plugin.
  2. Search for it. Type “SameSite Cookies” and pick the one by Ayesh Karunaratne.
  3. Install and activate. Click Install Now, then Activate.
Install with a zip file or WP-CLI

Download the zip from the WordPress.org plugin page, then go to Plugins → Add New Plugin → Upload Plugin, choose the file and click Install Now. Or from the command line:

wp plugin install samesite --activate

Requirements: WordPress 6.2+ · PHP 7.0+ · tested up to WordPress 6.3.15

Hooks & customisation

SameSite Cookies 2.1 fires 2 actions and 4 filters. Use them from your child theme or a snippets plugin to change how it behaves without editing its files.

samesite — top hooks
// Filters the duration of the authentication cookie expiration period.
apply_filters( 'auth_cookie_expiration', 14 * DAY_IN_SECONDS, $user_id, $remember );

// Filters whether the logged in cookie should only be sent over HTTPS.
apply_filters( 'secure_auth_cookie', $secure, $user_id );

// Filters whether to use a secure cookie when logged-in.
apply_filters( 'secure_logged_in_cookie', $secure_logged_in_cookie, $user_id, $secure );

// Allows preventing auth cookies from actually being sent to the client.
apply_filters( 'send_auth_cookies', true, $expire, $expiration, $user_id, $scheme, $token );

// Fires immediately before the authentication cookie is set.
do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme, $token );

// Fires immediately before the logged-in authentication cookie is set.
do_action( 'set_logged_in_cookie', … );

Browse all 6 hooks with examples →

SameSite Cookies: frequently asked questions

Is SameSite Cookies free?

Yes. SameSite Cookies is free to download from the official WordPress.org plugin directory and is licensed under the GPL, so you can use it on as many sites as you like. Some developers sell a separate Pro version or paid add-ons; check the developer's website for details.

Is SameSite Cookies safe to use?

SameSite Cookies has not been updated for 3 years. Plugins without updates stop receiving security fixes, so we recommend a maintained alternative for new sites. Users rate it 2.5 out of 5 from 11 reviews on WordPress.org. As with any plugin, keep it updated and only install it from WordPress.org or the developer.

Does SameSite Cookies work with WordPress 7.1?

It isn't confirmed. SameSite Cookies was last tested with WordPress 6.3, 8 releases behind the current 7.1, so test it on a staging site before relying on it. It requires WordPress 6.2 or later and PHP 7.0 or later.

How many websites use SameSite Cookies?

SameSite Cookies is active on 700+ WordPress sites, according to WordPress.org. It is currently at version 2.1, last updated on July 23, 2023.

What are the best alternatives to SameSite Cookies?

We didn't find a maintained plugin that does exactly the same job. Browse the top-rated Analytics & Tracking plugins for related options.

Can I customise SameSite Cookies without editing its code?

Yes. SameSite Cookies 2.1 fires 2 actions and 4 filters that you can use from a child theme or a code snippets plugin, so your changes survive plugin updates. Browse all 6 hooks with examples.

Done for you

Let us deal with SameSite Cookies for you

Move to a maintained plugin without losing your settings, or keep this one and have it brought up to date.

Update an abandoned plugin

from $249

Keep the plugin your site depends on, made safe for current WordPress and PHP.

  • Compatibility with current WordPress and PHP
  • Security review and fixes
  • Deprecated code replaced
  • You keep a maintained copy

Typical turnaround: 5–10 business days

Choose this

Not sure which fits? Describe what you need and we’ll suggest the simplest option.

Need SameSite Cookies customised?

Tell us what you want changed, added or fixed and we'll reply with an estimate.

WP EXPERTS is independent and not affiliated with Ayesh Karunaratne. Plugin names and logos belong to their owners. Version, rating and install figures from WordPress.org, checked Nov 19, 2026.

More plugins by Ayesh Karunaratne

All 7 →
Not updated in 5+ years

Adds support for embedding Facebook and Instagram posts in Block Editor (Gutenberg) and Classic Editor.

3,000+ installs Updated 5 years ago
Not updated in 2+ years

Makes WordPress use PHP's native password_hash() functions for portable, stronger, and time-attack safe bcrypt and Argon2 hashes.

1,000+ installs Updated 2 years ago 2 hooks
Not updated in 3+ years

Prevent Cross-Site Request Forgery attacks on your comments form.

400+ installs Updated 3 years ago
Not updated in 3+ years

Prevents WordPress from delivering full Page-Not-Found errors when the browser is not expecting a full HTML page. Saves bandwidth and…

50+ installs Updated 3 years ago

Alternatives in Analytics & Tracking

See all →

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful…

5+ million installs Updated 7 days ago 91 hooks
Reviewed

The best free Google Analytics plugin for WordPress. See how visitors find and use your website so you can grow…

2+ million installs Updated 2 months ago 186 hooks
Reviewed
CookieYes icon

CookieYes

3,239

Google-certified CMP: cookie banner, cookie notice and cookie consent for GDPR/CCPA compliance, with cookie blocker, cookie scanner and consent log.

1+ million installs Updated 2 weeks ago 82 hooks

Publish your cookie banner or notice in minutes. Automatically scan cookies, and create policies to align with GDPR, CCPA, and…

1+ million installs Updated 3 weeks ago 184 hooks