Cookie warning for wordpress

Asks users’ consent for using cookies or redirects them out of your site.

Download the plugin

To comply with the May 2011 EU cookie law whose enforcement will start in May 2012 for UK website owners, this plugin welcomes your first time visitors with a custom message asking for their consent using cookies on your website. If they disagree, any cookie already sent is removed and the visitor is redirected out of your site. It is a solution that strictly complies with the law.

You can customize the message displayed as well as the text of the ‘I agree’ button and of the ‘I disagree’ link.

This plugin was written with the EU cookie law in mind but can be used for any terms and conditions you need your visitors to approve before viewing your site.

From here:


ookie warning message on first visit

ookie warning message on first visit

Cookie warning options page

Cookie warning options page


The easy way

  1. Download the plugin – it will come as a .zip file
  2. Log in to your WordPress dashboard
  3. Go to Plugins > Add new
  4. Under the ‘Install Plugins’ header, click ‘Upload’
  5. Click the ‘Choose File’ button, browse your computer to find the .zip file downloaded at step 1, click ‘Install now’
  6. Click the ‘Activate plugin’ link

The show off way

  1. Download the plugin .zip file
  2. Unzip the file
  3. Upload the ‘cookie-warning’ directory to the ‘/wp-content/plugins/’ directory
  4. Activate the plugin through the ‘Plugins’ menu in WordPress

User guide

To customize the message displayed

Go to ‘Settings > Cookie Warning’. On that page, you will be able to change: the message displayed, the redirect link – when visitors do not accept the cookies,
the wording of the ‘Accept’ button and ‘Do not accept’ link.


How can I preview the changes I make to my cookie warning message?

The point is to display the message on the user’s first visit only, which makes it tricky to preview the changes you make to the cookie warning message…

Two ways around that:

  1. View your site in a web browser with which you haven’t viewed the site yet.
  2. Clear your browser of cookies – I know… Any website feature that requires the discrimination between first time and returning visitor needs to rely on… cookies! Hopefully the EU law makes that use of cookies legal. It’s just one of its many inconsistencies!!

Where do I go to report bugs, for complaints, moans, suggestions or to sing your praises?

Just send an email to, alternatively, leave a comment below!


Current version 1.3

  • Fixed bug in ajax call to clear cookies.


  • Attempt at fixing scrolling bug on iPhone.


  • Doesn’t add ‘#’ to the url anymore when user approves or rejects message


  • Message doesn’t appear at all for users who disabled cookies in their browser


  • Corrected incompatibility with a series of gallery/slideshow plugins and themes


  • Corrected bug so that notification is displayed only once; used to work only of home page visited first.

A big thank you to Theo Chung of for reporting the bug and to John Jameson of for reporting it and offering a solution!



Hi, I like the plugin, my question is whether it could add a link to the page cookies policy in the same plugin and how they could do.


Hi Miguel, unfortunately that is not possible as all pages of the website are hidden until the user accepts the cookie message. In other words, you could add a link to the privacy policy in the pop up message but that page would be hidden by the message anyway.


Awesome plugin for WordPress, thanks so much.

Can this be easily used on a none wordpress website?


Hi Marie

I have installed Cookie Warning on three of my websites. On two of them it was amazingly quick and easy to install, but on the other one the main text of the warning doesn’t appear – all that appears is a white box with “I don’t agree” and “that’s fine” in the corner.

I have looked at it in three different browsers – Safari, Chrome and Firefox – and the same problem occurs. Can you help?

Thanks, Natalie


Hi Natalie,

That is because the default font colour on that website is white. Here is how to sort this out:

– From your dashboard go to ‘Appearance > Editor’,
– Select you theme in the drop-down menu on the right-hand side and click ‘select’,
– In the list of files under the drop-down box click ‘style.css’,
– The content of the file appears in the window on the left,
– Add the following at the bottom of the file:

div#cookiewarning div#back p { color: #000000; }

Let me know if the problem persists!


Hi Marie

I’ve inserted the line you suggested into the style sheet, but unfortunately it hasn’t solved the problem. Is there anything else I can do?




Hi Nathalie,

Could you please edit the code you have added to the stylesheet like this?

div#cookiewarning div#back p { color: #000000; !important }


Hi, nice, small plugin. I have one concern – my site uses GoogleAnalitics (GA coded embedded in default location -> Tracking Section of Site Options), I’ve noticed that GA cookies get stored on the visitor’s computer even if I deny consent for cookies….


Hi Jj,

What is supposed to happen is that, when the user rejects cookies, they are all removed and the user is then redirected out of the site. Are you saying the GA cookies persists despite that?


OEPS I was to fast! I’ve changed the position in cookiewarning.css to ‘absolute’ (instead of ‘fixed’…problem solved!



Thanks for this great plugin! I use it for a responsive website and the only thing is that it can’t scroll down to accept the cookies & enter the site on an iPhone! Please, can you help me out? I’ve version 1.2 installed.


OEPS I was to fast! I’ve changed the position in cookiewarning.css to ‘absolute’ (instead of ‘fixed’…problem solved!


Hi Marie,

I very much like the simplicity of your cookie warning plugin. Thank you!
However, after the major update of the Woocommerce-plugin (to 2.0), it doesn’t seem to work well anymore in IE9. : cookie warning works fine in IE9 (with Woocommerce 1.6.6) and : cookie warning doesn’t work well in IE9 (with Woocommerce 2.0.4). (I have deinstalled the cookie plugin in though).

Could you please help me with this problem?

Many thanks,


Hi Hetty,

Thanks for using the plugin!

This sounds really specific. Have you tried asking the WooCommerce team as well? This might be a general problem of their latest release and other plugins (specifically those using cookies).


Hi Marie,

Thank you for your quick reply.

Yes, I asked the WooCommerce team before I contacted you. However, they said they are not responsible for the plugin and suggested to contact you.

This looks like a stalemate…


hmm… Yes, not a great situation to be in, Hetty! Sorry about that.

I’ll have a look at the problem in the coming days see if I can find out anything.


Hi Marie,

My problem with the cookie warning in both sites has been solved. It had to do with a redirect within the site.

Sorry for the confusion I caused.

Thanks again for your help.



What a brilliant plug-in! So easy to install and exactly what I was looking for. Many thanks indeed.


Hi there

I’m having a problem with the plugin when viewing the websitse on phones. It appears ok but you can’t scroll past it to click. Any ideas how I can solve this? I do love the plugin and would like to continue using it but too many people keep saying it to me now for me to ignore ! 🙂


Hi Catherine,

When you say they ‘can’t scroll past it to click’, do you mean they can’t access the ‘accept’ button and ‘Reject’ link?

Could you maybe give me the link to your website so I can see what’s going on? You can email it to me if you prefer:


The issue that Catherine is having has to do with the css “position: fixed”. This makes the “popup” stay at the top of the screen, even when you scroll.
When using a mobile device (low resolution) the “popup” won’t fit on the screen, but scrolling down will not scroll the “popup”. Thus the mobile user can’t reach the “okay” button and will be unable to visit the site…


Hi Coinage,

Thanks for clarifying. It actually works on my Android so I could not see the problem clearly.

I don’t see an immediate answer to this (at least not without affecting the pop-up’s behaviour on desktops) so I’m currently looking into the problem.


Hi guys,

I’ve just released a new version of cookie warning. I’ve changed the positioning and scrolling system so it should now work on phones as well.

Any problem, please let me know.


Hi Marie,

I like your plugin – works well and perfect for my purposes.

Just one suggestion:
I run a fairly large site, mixed HTML/PHP pages with a WordPress blog. The non-Wordpress part already had a cookie warning (by total coincidence based on the same script you used), but the plugin’s own cookie name is slightly different. Therefore it was possible the users would be asked the question twice! I hacked the code to make the names the same, so no worries! However it would be really great if the name of the warn cookie could be changed in your options screen.


Hi Geoff,

That’s quite a coincidence 🙂

And, great suggestion! I’m adding it to my to-do list for a future update.


Hi Marie, I hope all is well. Have had a bit of a problem. I saved the module to my pc but when I uploaded the cookie module into Prestashop back office. All my modules list dissapeared. The site seems to be working ok but I can no longer see or configure any of the sites modules. I am running Prestashop 1.42.5. Can you advise how to display my modules. Thanks in advance.


Hi Justin,

Cookie Warning is a WORDPRESS plugin. It is not made to work in Prestashop – unless you are using a prestashop integration plugin in a WordPress website?


How silly of me! Because I had searched for the module on Google using the “Prestashop” search term, I had presumed it was a Prestashop module. In any case, I deleted the upload through contol panel and everything is working fine again. sorry to have inconvenienced you. Have a great day!


No problem, Justin. Hope you can find a good Prestashop module!


Hi Marie,

Thanks for the plug-in!

I’ve got 2 small questions about it.
When people go to a website with the plug-in, but click ‘decline’, can we than still see in Analytics that they have visited the website? Because that way we would still use the visitors data.

Further, we have included a flash-banner on the website, which is displayed in front of the cookie-warning, so visitors cannot read the cookie-warning. Is there something to fix this problem?

Thanks in advance!

Best regards,



Hi Jaimy,

Thanks for using the plugin!

You can see that a visitor has hit your homepage (or any other entry page for that matter) in the analytics, even if they decline cookies. What you won’t be able to see is that they are ‘returning visitors’ if they come back.

Re the flash banner, you need to set the ‘wmode’ parameter of the banner to ‘opaque’ to avoid that kind of overlay issue.

All the best,



Great widget.

I was wondering, is it possible when the popup first appears for the user to still be able to click links on the page etc.

Currently this is not possible as everything is greyed out until they accept the policy.

I’d love them to be able to click over links, everything would still be greyed out and the popup still appearing until they accepted.



Hi Jay,

The purpose of cookie warning is to prevent users accessing the website until they’ve accepted cookies (or other terms and conditions). You might be interested in other options – plugins that display a message at the top of the screen – such as this one:

Hope that helps!

Volker Hett

Thanks for this plugin. Although I’m not affected in germany at the moment I tried your plugin.

And here is my bug report 🙂 It interferes with polaroid gallery, the pictures are in the source but are not shown.


Actually… you’re not the first one to report problems with front-end plugins involving image downloads… will have a look as soon as I can!


Hi Marie,

Thanks for the plugin. Do you intend updating it to enable implied consent like the BBC et al?


Hi John,

I’ve just been made aware of the UK gov U-turn on the policy! Not sure my ‘take it all or leave it’ approach is relevant in that context any more.

‘Implied consent’ might just mean adding a line to the header or footer of your website with a link to a cookie section of your privacy policy that details the cookies in use on your website, state that by their using the website you assume consent of the users and that explains that cookies can be turned off in the browser… which doesn’t really require a plugin!

Changing this plugin to fit the new version of the law will turn it into a completely different plugin actually.

Phew… need to sit down and re-think the whole thing 🙂


Hi again! Look out for version 0.3 of the plugin. The compatibility problems with the polaroid gallery are sorted in there!


Really great plugin, thought I’d drop by and say thanks.

Shouldn’t have any impact on SEO, right?


Thanks, Chris! No it shouldn’t have an impact on SEO. To search engines, the message is just a little extra content to the page.


Thanks for the reply.

I noticed an incompatibly with the “Quick Chat” plugin though, when cookie warning is enabled the chat rooms stop working completely which is a bit of a shame.


Thanks Chris. Will have a look when I get some time.


Hi Chris, this should all be sorted with version 0.3 of the plugin!

David Hastie

Hi Marie
Really like this plugin for its simplicity and use it for my personal site However, it doesn’t seem to work properly with my other site with a theme that includes a slider. The pop up shows on first visit and I can accept the cookies, but then subsequently the slider no longer works. Do you know if there Is there an easy bit of code I can add / or way I can modify the files to make the slider work properly again.



Hi Dave,

Can’t think of anything from the top of my head. If it’s a freely available theme, would you mind just telling me where I could download it to do some testing?


David Hastie

Hi Marie

Thanks for the super quick reply. It turns out that the update to 0.3 fixed the problem, whatever it was, so thank you very much. All seems to be working exactly as desired now.

Many thanks


I love the concept of this plugin, but to satisfy the new rules on cookies, you have to make users aware of any changes and especially any changes that refer to your use of cookies. You then need to gain a positive indication that users understand and agree to the changes.

Am I right in thinking that once a person has accepted my cookie policy, then I cannot use it again (which I may need to in the future)to notify those same people of any changes as and when they occur


Thanks for pointing that out! I think you are right. Yet, integrating a ‘policy update’ feature into the plugin seems ridiculously complicated… Well, the whole thing is ridiculous anyway 🙂

I definitely need to consider it for a plugin upgrade.


I was dreading compliance with the EU law but this has simplified my task immensely, Thank you for making this plugin


Thanks for this – I like the fact I can change the wording easily. I suspect many people will get very p’d off very quickly with getting these messages every time they visit a site – think the EU has definitely done itself no favours here. Still – now I can use a ‘sensible’ message on my copmmercial’ sites and be a little more flippant on my personal one!

[-: Michael :-]


You’re welcome, Michael! Glad to see it helps.

I am hoping the gov is unable to actually enforce the law or for the whole nonsense to be dropped so I can remove that pop-up from my sites. Fingers crossed!

Comments are closed.