SameSite Cookies WordPress Plugin | Codefreex Skip to content
SameSite Cookies icon

WordPress plugin

SameSite Cookies

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

By Ayesh Karunaratne700+ active installs2.5 out of 5
Active installs
700+
Rating
2.5 / 5
Version
2.1
Last updated
Jul 23, 2023
Tested up to
WordPress 6.3.15
Requires
WP 6.2 · PHP 7.0

Health check

Is SameSite Cookies safe to rely on?

Our reading of the public WordPress.org data: maintenance, compatibility, ratings and support.

No update in over a year

Last updated on July 23, 2023. It may not be compatible with current WordPress or PHP, and unfixed issues are a security risk.

Not yet tested with the latest WordPress

Tested up to WordPress 6.3.15. It often still works, but check on staging first.

Low user ratings

Rated 2.5 out of 5 from 11 ratings on WordPress.org.

Requires PHP 7.0 or newer

Check your hosting PHP version before installing. Modern PHP is faster and receives security fixes.

Rank tracker

Where SameSite Cookies ranks in WordPress.org search

Its position in WordPress.org plugin search for its tags and name, refreshed weekly so you can see how its visibility changes.

WordPress.org search positions for SameSite Cookies
KeywordPositionChangeTrendCurrent #1
cookies
csrf
samesite
security
samesite cookies

Checked against the top 100 WordPress.org search results.

Overview

What SameSite Cookies does

This plugin adds the “SameSite” cookie flag to WordPress’s authentication cookies. On supported browsers (all current IE, Edge, Chrome, and Firefox), this can effectively prevent all Cross-Site Request Forgery attacks throughout your WordPress site.

SameSite cookie flag support was added to PHP on version 7.3, but this plugin ships with a workaround to support all PHP versions WordPress supports.

There is no administrative UI provided: Activate this plugin, and you are all set!

You can configure the SameSite flag value from your WordPress configuration file. You cna pick a value from Lax (default), Strict, or None. You can read about SameSite cookies here.

To configure the SameSite flag value, edit your WordPress configuration file (wp-config.php), and add the following lines right above /** Sets up WordPress vars and included files. */.

define( 'WP_SAMESITE_COOKIE', 'Lax' ); // Pick from 'Lax', 'Strict', or 'None'.

Note that only the authentication cookies are affected. Regular cookies that your installed plugins set will not be affected, nor provide any meaningful value with SameSite flags.

Description from the author's listing. Read the full listing on WordPress.org

Screenshots

SameSite Cookies in action

Browser response containing the SameSite attribute in Setcookie headers.
Browser response containing the SameSite attribute in Setcookie headers.

FAQ

SameSite Cookies: questions and answers

What is SameSite Cookies?

SameSite Cookies is a WordPress plugin by Ayesh Karunaratne. CSRF-protection for authentication cookies. When enabled, this plugin makes sure the "SameSite" flag is set in authentication cookies.

Is SameSite Cookies free?

SameSite Cookies is listed in the WordPress.org plugin directory, so the version there is free to download and use. Some authors also sell paid add-ons or a premium edition with more features and support.

How many websites use SameSite Cookies?

WordPress.org reports 700+ active installations of SameSite Cookies. That figure counts sites running the WordPress.org version and is rounded down by WordPress.org.

Is SameSite Cookies still maintained?

SameSite Cookies was last updated on July 23, 2023. The current version is 2.1. Check the changelog on WordPress.org and test updates on a staging site before applying them to a live site.

What does SameSite Cookies require?

SameSite Cookies requires WordPress 6.2 or newer and PHP 7.0 or newer. It has been tested up to WordPress 6.3.15.

Can Codefreex set up or customize SameSite Cookies?

Yes. Codefreex installs, configures and customizes WordPress plugins including SameSite Cookies, fixes conflicts and performance problems, and builds custom features when a plugin does not do exactly what you need. Send your site URL for a free review.

Free expert review

Need SameSite Cookies set up, customized or fixed?

Tell us about your site and what you need this plugin to do. A senior WordPress developer replies within one business day with a plan and a quote.

Built this plugin yourself? We help WordPress product teams with development, support load and growth. Talk to us