Back to Community

How to Completely Remove CookieYes Plugin Data from Your WordPress Site

Content

Many WordPress users choose to uninstall the CookieYes – Cookie Banner for Cookie Consent plugin. However, a common and frustrating issue arises when remnants of the plugin, such as the cookie banner, cookies, or database tables, persist on the site even after deactivation and deletion. This guide explains why this happens and provides clear, step-by-step solutions to achieve a complete removal.

Why Does CookieYes Data Remain After Uninstalling?

There are a few primary reasons why you might still see traces of the plugin:

  • Browser Cookies: The plugin sets cookies in your visitors' browsers. Uninstalling the plugin from your WordPress dashboard does not automatically clear these cookies from users' browsers.
  • Server or Caching: A heavily cached site (using plugins like W3 Total Cache or LiteSpeed Cache) may continue to serve a version of your site that includes the banner. Clearing all caching layers is crucial.
  • Incomplete Database Removal: By default, the plugin may not delete its configuration tables from your WordPress database upon uninstallation to preserve settings. A specific constant must be defined to force a full data wipe.
  • Google Tag Manager: If you implemented the banner using a CookieYes template in Google Tag Manager (GTM), you must remove it from GTM and publish the changes, as this is separate from the WordPress plugin.

How to Perform a Complete Uninstall

Solution 1: The Standard Method (For Most Users)

  1. Clear Site and Browser Cache: Deactivate any caching plugins and clear their cache. Also, clear your server-level cache if you have one (e.g., from your hosting panel). Finally, clear your own browser cookies for the site.
  2. Define the Removal Constant: Before deactivating the plugin, you must add a specific line of code to your wp-config.php file. This file is located in the root directory of your WordPress installation.

    Access your wp-config.php via your hosting file manager or FTP. IMPORTANT: Always back up this file before editing.

    Find the line that says /* That's all, stop editing! Happy publishing. */. Add the following line of code ABOVE it:
    define('CKY_REMOVE_ALL_DATA', true);
  3. Deactivate and Delete the Plugin: Go to your WordPress admin dashboard under Plugins. Deactivate the "CookieYes" plugin, then delete it. Defining the constant first ensures all plugin database tables are removed during deletion.
  4. Optional: Remove the Constant: After successfully deleting the plugin, you can remove the define('CKY_REMOVE_ALL_DATA', true); line from your wp-config.php file to keep it clean.

Solution 2: If You've Already Deleted the Plugin

If you already deleted the plugin without defining the constant, follow these steps:

  1. Reinstall the CookieYes plugin from the WordPress repository.
  2. Follow Solution 1 exactly: Add the constant to wp-config.php, then deactivate and delete the plugin again.

Solution 3: Check Google Tag Manager

If the banner persists and you previously used GTM:

  1. Log in to your Google Tag Manager account.
  2. Select the correct container for your website.
  3. Thoroughly check all tags, triggers, and templates for any related to "CookieYes" or "CMP".
  4. Remove any found CookieYes elements and publish the updated container.

What About the Cookies Already Set on Visitors' Browsers?

The plugin's cookies are stored on your users' devices, not your server. You cannot directly delete them. The solutions above prevent the plugin from setting new cookies. Existing cookies will eventually expire based on their lifespan or will be cleared when users manually clear their own browser cache and cookies.

Need More Specific Help?

If you have followed all these steps and the issue persists, the problem may be highly specific to your site's configuration. Common culprits include complex caching setups, conflicts with other plugins, or a non-standard implementation. For further independent troubleshooting, describing your specific scenario in detail on community forums can help others provide targeted advice.

Related Support Threads Support