How to Add a Cookie Policy to Your WordPress Website

WordPress is one of the most popular content management systems (CMS) used worldwide. It is a completely free and open-source tool that allows anyone to create a fully functioning web page or blog in no time at all. If you are looking for a blogging platform to host your content or would like to create an online store, then WordPress is a great choice.

But just because WordPress is free and open-source, that does not mean it is without its own quirks. One of those quirks is how it handles cookies. If you host your WordPress website on a shared server, then other websites or users on your server will be able to access your cookies. This is usually harmless, but it’s always nice to know who’s viewing your site and what they’re looking at, right?

To protect your users’ privacy, you can add a cookie policy to your WordPress website to notify them that their privacy is important to you. The following article provides a guide on how to do exactly that.

Step one: Obtain the necessary permissions

Before you start setting up your cookie policy, you’ll need to make sure that you have the necessary permissions to do so. Without proper permissions, you won’t be able to set the cookie policy correctly and could potentially end up damaging your website, especially if you follow the wrong procedures or use the wrong tools. To ensure that your users know that their data is private and to follow the necessary procedures to ensure this privacy, you will need to:

  • Log in to your WordPress dashboard
  • Click on the Settings tab
  • Scroll down to the bottom and click on the Privacy button
  • Make sure that the Privacy Policy is correct
  • Then, click on the Save Changes button
  • Finally, click on the Publish button

If you followed the above steps correctly, then your WordPress website should now have a privacy policy. Congratulations! You can confirm this by clicking on the Privacy policy link that appears at the bottom of the page.

Step two: Create a notice on your website

Once you have confirmed that you have a privacy policy, you can move on to the next step. The first thing you’ll need to do is create a notice on your website to inform your users of the policy. The best place to put this notice is at the top of your website. You can use the following code:

“Cookie Policy: ” (or) “Privacy Policy: ” (or) “Sharing Cookies: ” (or) “Third Party Cookies: ” (or) “Web Analytics: ” (or) “Disabled: ”

The above code can be easily copied and pasted into your website’s footer. It will then appear at the bottom of every page on your site. Remember, if you are using a sub-domain for your site (e.g., vs., then the footer will only display on the former. For example, if you are using a free WordPress hosting service, then the footer code will only display on the main domain (e.g.,

Step three: Test the notice

Once you’ve placed the notice at the top of your site, you can test it to see if it draws the attention of your users. Visit your site often during the next week and check out the traffic that it is receiving. After seven days, you can compare the amount of traffic during that week to the amount of traffic you received before putting the notice up. If there was less traffic after the policy was published, then you know it worked.

If you are still seeing a lot of traffic, then you might want to place the notice at the top of a few more pages before you claim that the original page was the most effective. Alternatively, you could place multiple notices on your site and test each one separately to see which one gets the most website traffic. This way, you can be sure that you are targeting the right audience for your website.

Also, make sure that you follow the proper procedures when testing the notice. In some instances, a notice in an obscure place on your site can prevent or hinder you from testing certain features on your site or plugin. For example, if you have a comment section on your blog and you want to test the nofollow attribute for comments, then you’ll need to place the cookie policy notice at the top of your site before you begin the process. If you don’t, then the nofollow attribute for comments won’t show up until you publish the comment section (i.e., after you place the cookie policy notice).

Step four: Add the GDPR text

If you are based in the European Union (EU), then you need to add some text to comply with the General Data Protection Regulation (GDPR), which came into effect earlier this year. You can use the following code to do so:

“1) Personal data: We, as data controllers, have control over the processing of your personal data. We process it lawfully ” (or) “2) Scope of processing: We only process your personal data within the EU (or) “3) Purposes of processing: We process your personal data for the purposes of offering you our products and services, and for ensuring smooth functioning of your relationship with us. ” (or) “4) Duration of processing: As stated in Article 6(1) of the GDPR, our processing is limited to the minimum necessary to achieve the purposes for which we process it. We review and erase your personal data upon request and free of charge.

The above code can be easily copied and pasted into the text file of your WordPress website. Make sure to save this file as a.txt file so that it ends up being text-based instead of rich-media (e.g., images, audio, video). If you followed the above step correctly, then your website should now have the necessary permissions, a notice at the top of your site, and the GDPR text in the footer. Congratulations! You can now inform your users of your website’s privacy procedures and opt-in tools.