on May 5, 2012 in WordPress with 34 comments by
Cookie Sandwich by Neil Conway

Note! This plugin has been deprecated; it is no longer maintained nor supported.

Cookillian is a WordPress plugin that makes it easier for your WordPress site to comply with the EC Cookie Directive, which affects the United Kingdom on May 25th 2012 and other European countries.

Cookillian will automatically detect if a visitor is located in one of the countries defined by you – likely the countries affected by the EC Cookie Direcitve – and will automatically disable any cookies that are set from within WordPress or a 3rd party plugin. The user will then be presented with an fully customizable alert about cookies, and given the option to opt in or out of using cookies.

It will also collect basic information about any cookies set from within WordPress or 3rd party plugins, allowing you to add a description and whether the cookie is required for the website to operate. If the cookie is required, Cookillian will allow it to be set regardless if the visitor has opted in or out. Using a shortcode, a full description of the cookies used by the website can be presented to the visitor to assist with compliance and/or privacy notices.

If the visitor allows for cookies (either through opt in or a visitor outside the countries specified), then additional Javascript can be included at the website’s header and/or footer, allowing the inclusion of, for example, Google Analytics. This allows for better control over 3rd party cookies.

With the included statistics, you can see how many visitors have decided to opt in, out or ignore the cookie alert per country, for each month of the year.


  • Selective cookie filtering and alerts based on the visitor’s originating country
  • Automatic alerts, or manually displayed using a WordPress filter, API or shortcode
  • Fully customizable alert text and styling
  • Optional JavaScript loading if cookies are permitted
  • Support for Cookie-based PHP Sessions
  • Define cookies that are required for the operation of the website
  • Automatic collection of cookies used by the website
  • Automatic rendering of details about cookies using shortcodes
  • Support for geoPlugin geolocation service
  • Support for CloudFlare geolocation HTTP headers
  • Support for MaxMind geolocation database or Apache module/NginX GeoIP module
  • JavaScript and PHP API
  • Backup geoloaction service, should the default geolocation service fail
  • Statistics to track the impact of the EC Directive
  • Debug mode for web development and testing
  • Support for the DNT/Do Not Track browser headers (See
  • Support for “Implied Consent”
  • Dashboard widget for quick overview of the statistics, and if new cookies have been detected


This project is licensed free of charge under the terms and conditions of GNU GPLv3Donations are welcome!



  • PHP version 5.3 or better
  • WordPress version 3.3 or better

A browser with Javascript enabled is highly recommended.

NOTE! This plugin will not work with PHP versions older than 5.3.


The ZIP file containing Cookillian can be downloaded with the following link. This will download the most recent stable version of Cookillian.

Download “Cookillian” – Downloaded 13516 times – 450 KB

If you prefer to try a development or older version, visit the Developer’s section at or follow its progress at GitHub.


To install the plugin, visit your WordPress Dashboard, select Plugins and then Add New. If you have already downloaded the file, select the Upload option and upload the file per the instructions. Otherwise, search for “Cookillian” and WordPress will allow you to install the plugin directly from


To install a development or earlier version of Cookillian, you must first de-activate and delete the current plugin if it’s already installed.

Deleting the plugin will also reset all its settings and detected cookies.

After de-activation and deletion, you can install Cookillian using the usual upload method described above.


Support is provided through the forums and by contacting Myatu directly.

Read more

Over time, more posts regarding Background Manager will be added, including “How To’s”.  Keep an eye on the posts with the cookillian tag.

Photo “Cookie Sandwiches” courtesy Neil Conway (CC-BY)



  1. posted on Feb 09, 2014 at 12:12 AM  |  reply

    […] de la ventana emergente, que puedes modificar en su página de ajustes como apunta el autor (y da ejemplos), cumple de maravilla pero, sobre todo, ofrece algún extra más que […]

  2. Muhammad Faisal
    posted on Nov 20, 2013 at 2:55 PM  |  reply

    Sorry I didn’t mention above I am using WordPress 3.7.1.

  3. Muhammad Faisal
    posted on Nov 20, 2013 at 2:51 PM  |  reply

    Hello Myatu,

    I am getting the problem in Background Manager Plugin Version I am mentioning my error below.

    Fatal error: Invalid opcode 153/1/8. in /wp-content/plugins/background-manager/app/Myatu/WordPress/BackgroundManager/Main.php on line 668
    Fatal Error (E_ERROR)

    There was a fatal error in the plugin Background Manager.

    The error occurred in file /wp-content/plugins/background-manager/app/Myatu/WordPress/BackgroundManager/Main.php on line 668. The cause of the error was:

    E_ERROR: Invalid opcode 153/1/8.
    Because of this error, the plugin was automatically deactivated to prevent it from causing further problems with your WordPress site.

    A log of the error can be found in the file /wp-content/plugins/background-manager/background-manager.log

    Please contact the plugin author Mike Green (Myatu) with the above details or the logfile if this problem persists.

    Please tell me how can i fix this error ….?

    • Myatu
      posted on Nov 20, 2013 at 9:52 PM  |  reply

      This is the same error as described in an earlier comment, and is most likely due to a bug in eAccelerator – a PHP Opcode cache/accelerator. I would recommend using APC instead.

  4. Jota
    posted on Nov 11, 2013 at 10:57 AM  |  reply

    I have PHP version 5.3.18.
    WordPress 3.5.2.

    But when I try to activate and lplugin this error:

    Fatal Error (E_ERROR)

    There was a fatal error in the plugin Cookillian.

    The error occurred in file on line 685. The cause of the failure was:

    E_ERROR: Invalid opcode 153/1/8.

    What could it be?

    Thank you.

    • Myatu
      posted on Nov 11, 2013 at 12:44 PM  |  reply

      This looks like a known bug with eAccelerator 1.x from what I can find. You should either downgrade eAccelerator (0.96 seems to work OK) or replace it with another opcode cache, such as APC (for which the code is optimized).

  5. posted on Sep 02, 2013 at 8:55 PM  |  reply

    I’m afraid it does not work in WP 3.6. It’s a shame, it’s a amazing plugin. Please, update. Thank you very much

    • posted on Sep 16, 2013 at 9:10 PM  |  reply

      The plugin works with WP 3.6

  6. posted on Sep 01, 2013 at 7:34 PM  |  reply

    […] de la ventana emergente, que puedes modificar en su página de ajustes como apunta el autor (y da ejemplos), cumple de maravilla pero, sobre todo, ofrece algún extra más que […]

  7. Chris
    posted on Jun 24, 2012 at 4:50 PM  |  reply

    Great plugin. But its broken in wordpress 3.4. When you click ok, or use implied consent it keeps showing the widget to the visitors.

    • posted on Jun 24, 2012 at 5:54 PM  |  reply

      Hi! Do you have an example (URL) of where this is happening? It has been tested with WordPress 3.4 (this website uses it).

  8. posted on Jun 21, 2012 at 11:17 AM  |  reply

    Thanks for a great plugin.
    Is the a way to localize the texts in the frontend?
    Example: “Information regarding cookies”
    I can modify the text in admin, but it affects all locales.
    Using WPML for handling translations.

    • posted on Jun 21, 2012 at 11:39 AM  |  reply

      Hi! Not yet, but I am considering adding this option.

  9. Richie
    posted on May 18, 2012 at 4:54 PM  |  reply

    How do we get this to work with Google Adsense?

  10. julieswin
    posted on May 17, 2012 at 10:27 AM  |  reply

    Hi Myatu,

    Thank you so much for this.  I have now got my host to apply PHP 5.3 and the plug in loaded up without further problem.  I just have a couple of questions if you wouldn’t mind?

    1.  I selected the 27 EU countries listed below, is that correct? 





    Czech Republic






















    United Kingdom

    2. Is it necessary to make any other changes to the settings?

    3.  I saw the notification but when I clicked on the two links to see more details and the privacy policy nothing happened.  Do I need to do something to set this up?

    4.  I clicked on No to see what happened and I remained on the site without the notification.  Does that mean that the user can use the site wthout any cookies being downloaded except for their answer?

    5.  Is there a way I can reset it after answering No so that I can test it further?

    Thanks once again. 

    Best regards,


    • posted on May 17, 2012 at 1:00 PM  |  reply

      Re 1, that’s correct. You can see all EU member states, including candidates at

      Re 2, this depends. The plugin is to assist with compliance, but it may not be a full-stop solution.

      For example, this plugin will stop WordPress and any plugins you’ve installed from setting a cookie. But, if there’s Javascript used on your website, they may still set cookies that are beyond the control of Cookillian. Google Analytics is probably the most common one, but other things like “Share on Facebook” or “Share on Twitter” buttons could set their own cookies.

      That’s why there’s the option within the plugin to include JavaScript in the header/footer if the visitor has agreed to receiving cookies – you’d need to remove that JavaScript from your website, and add it to the plugin option instead.

      Cookillian will also list which cookies it has detected (including ones set by JavaScript). There are also extensions for browsers – like – that help you see which cookies have managed to get past Cookillian. Google Chrome users can use the “Developer Tools” from the Menu bar as well.

      If you have any cookie that are required for your website to operate,
      ie., a cookie that stores products placed in a shopping cart, you can
      set these in the plugin’s “Cookies” page as well.

      Re 3, the links are placeholders. When you access the Settings ->
      Cookies page, you are given the opportunity to edit the alert message.
      In there you will find two links, where the “href=…” contains a hash.
      The hash needs to be a full URL to the actual page.

      If you wish to list the cookies from Cookillian’s “Cookies” page, you
      can use a WordPress shortcode of [cookillian cookies]. More on that in
      the Help tabs.

      Re 4, correct. If the user answers “No”, only that answer is stored but
      nothing else (bar anything from answer 2). If the user choses to ignore,
      the alert will be shown again on any subsequent page visit (as there is
      no method to store their answer). This is one added reason I’ve added
      geolocation to the plugin, so visitors outside the EU/UK will not be
      constantly asked this question – it’s one of the drawbacks of the law
      itself, in my opinion.

      Re 5, you can reset your answer to the alert by adding
      “?cookillian_resp=2” to any of your website’s URLs. For instance, if
      your website was, you’d type – of course you can make this a link
      on your website so it’ll be easier for visitors to change their answer
      too. Alternatively, at the very bottom of the plugin’s Settings page,
      under the heading “Advanced Options”, you will find a “Debug mode”
      option. Enabling this will permanently show the alert (regardless of
      your last choice), so to help with designing your website around the alert.

      Hope this helps! :)

  11. julieswin
    posted on May 16, 2012 at 8:46 PM  |  reply

    Hi, I got the following error.  What canl I do?

    Error: Unsupported version
    The plugin “Cookillian” requires PHP version 5.3.0 or better.
    of this error, the plugin was automatically deactivated to prevent it
    from causing further problems with your WordPress site.

    Error source: /home/julies/public_html/

    • posted on May 16, 2012 at 10:24 PM  |  reply

      Cookillian needs PHP version 5.3.0 or better to run. It seems your webserver/webhost is using an older version, so it needs to be upgraded first. Have a look at for more details on this.

      • julieswin
        posted on May 16, 2012 at 10:39 PM  |  reply

        Many Thanks Myatu.

        My host is looking into it.

        I hope I can get it working ok.

        Best Regards


  12. Paul Martin
    posted on May 15, 2012 at 5:27 PM  |  reply

    another site I am getting
    #1 Twig_Error_Runtime: Invalid escaping strategy “” (valid ones: html, js) in “settings.html.twig” at line 16. when trying to configure under settings

    • posted on May 15, 2012 at 6:16 PM  |  reply

      I’ve just looked at your website; the alert is not showing at the bottom of your page (which will be used to show it at the top of the page – everything else is there). I am wondering if that has to do with the error you’re experiencing.

      • Paul Martin
        posted on May 15, 2012 at 6:45 PM  |  reply

        This is another site I am getting this error in the admin panel under settings

      • Paul Martin
        posted on May 15, 2012 at 7:35 PM  |  reply

        did you get my email i sent from the contact form?

  13. Paul Martin
    posted on May 15, 2012 at 2:35 PM  |  reply

    Brilliant Plugin by way aswell :)

  14. Paul Martin
    posted on May 15, 2012 at 2:34 PM  |  reply

    does this work with firefox have added to my site but dont get the warning? also is there away to get the warning to re-appear after you select an option? one last thing entered the google analytics code into header and I get /* ]]> */

    • Paul Martin
      posted on May 15, 2012 at 3:00 PM  |  reply

      Ok got the funny code to go away from website needed to remove & but still cant get this alert to show in firefox

      • posted on May 15, 2012 at 4:04 PM  |  reply

        Hi. I’ll make that more clear about removing the tags in the Help tab. 

        As for the alert not showing, it will not prompt for it under these three circumstances: 1) The user was not detected to be from one of the selected countries, 2) The user has already opted-in or out or 3) The user has logged into WordPress (as in, Admin user, etc). 

        I will provide a debug option, forcing the alert to show (so you can design your website a little easier around it) and details about whether it would normally be shown or not, based on your own location.

        • Paul Martin
          posted on May 15, 2012 at 4:17 PM  |  reply

          Cool thanks, so if my PC has logged into the admin interface I wont get the prompt? I got it on IE but not firefox. Also another website I run its not showing in IE or Firefox.

  15. dude
    posted on May 14, 2012 at 2:34 PM  |  reply

    Brilliant solution, the best cookie plugin out there. Thanks for creating this.

  16. Ade
    posted on May 13, 2012 at 9:32 PM  |  reply

    Really good plug-in, going to try it once the PHP version on my hosting is upgraded. Will be excellent for the paid advertising spots I have.

    Just out of interest, have you developed a non-wp version?

    • posted on May 15, 2012 at 11:23 AM  |  reply

      I haven’t developer a non-WP version of this plugin no. Except for perhaps the configuation options and time constraints, it wouldn’t be too difficult though. 

      • Ade
        posted on May 17, 2012 at 7:10 PM  |  reply

        Yeah I had wondered. I am presuming it would be adaptable. By the way, I know this isn’t for support but can you see on my site as to why it isn’t displaying? 

        • posted on May 17, 2012 at 8:34 PM  |  reply

          Hi, your theme may be missing a wp_footer();. Usually located in the theme’s footer.php file, you should see a line that reads <?php wp_footer(); ?>

          • Ade
            posted on May 18, 2012 at 8:14 PM  |  

            Great call! Didn’t realise I was missing that! Thanks a lot Myatu.

Join the discussion

Your email address will not be published. Required fields are marked *