Privacy & GDPR Guide Beginner 3 min

Make WordPress Store Less Personal Data

WordPress keeps commenters' IP addresses and browser details, saves their details in cookies and sends their email hashes to Gravatar. What it stores, what you can stop storing and how to clean up what's already there.

TutorialBeginner12 minTested on WordPress 7.1Updated November 13, 2026

Privacy laws such as the GDPR ask you to collect only what you need and keep it only as long as you need it. That’s easier to do in WordPress than most people think. The default install stores more than many sites use, and each extra piece can be switched off.

Note

Before you start, look at Settings → Privacy and your privacy policy. After each change below, update the policy so it describes what your site really stores.

Comments: the biggest source

Every comment saves the commenter’s name, email, website, IP address and browser details. You need the name and email for most comment workflows. The rest is optional.

Don’t store IP addresses at all. Spam plugins sometimes use them, so check yours works without them first:

Snippet

Remove IP Address from Comments on Save

Prevent WordPress from storing the commenter's IP address at all by clearing it before the comment is written to the database.

PHPBeginner
View

Or keep them for a while, then anonymise them. A good middle ground: IPs are there for recent spam checks, then removed automatically after the number of days you choose:

Snippet

Auto-Anonymize Old Comment IP Addresses

Automatically anonymize the stored IP addresses of comments older than a configurable number of days, reducing personal data retention without deleting the comments themselves.

PHPIntermediate
View

Stop storing browser details, which WordPress saves with every comment and almost nobody looks at:

Snippet

Stop Storing the Browser Details of Commenters

Stop WordPress saving each commenter's browser and device details (user agent) with their comment.

PHPBeginner
View

Drop the website field. It’s mostly used for link spam anyway:

Snippet

Remove the Website Field From Comments

Remove the Website field from the comment form and ignore any website address that's sent anyway, reducing personal data and link spam.

PHPBeginner
View

Stop saving comment cookies. WordPress can remember a commenter’s name, email and website in their browser. That needs consent in many countries, and most visitors don’t comment often enough to benefit:

Snippet

Stop Saving Comment Cookies

Stop WordPress saving commenters' name, email and website in cookies, and remove the "Save my name" checkbox.

PHPBeginner
View

Avatars: stop asking Gravatar

To show an avatar, WordPress sends a hash of each commenter’s email address to Gravatar. That’s a third-party service receiving data about your visitors on every page with comments. Initials avatars, made on your own site, look tidy and send nothing:

Snippet

Use Initials Avatars Instead of Gravatar

Replace Gravatar images with coloured initials made on your own site, so visitors' email hashes are never sent to Gravatar.

PHPIntermediate
View

Logged-in users

WordPress stores the IP address and browser details of every login session. You rarely need them:

Snippet

Stop Storing IP Addresses With Login Sessions

Stop WordPress saving each logged-in user's IP address and browser details in their session records.

PHPBeginner
View

When you delete a user, their comments stay with their name and email. Keep the comments for the conversation, but remove the personal details:

Snippet

Anonymise Comments When a User Is Deleted

When you delete a user, keep their comments for the conversation but remove their name, email, website and IP address.

PHPIntermediate
View

Embeds

A YouTube or Vimeo embed loads the provider’s player, and its cookies and trackers, as soon as the page opens, whether the visitor plays the video or not. Load the player only when someone clicks:

Snippet

Load Video Embeds Only When Clicked

Show a placeholder with a "Load video" button instead of YouTube and Vimeo iframes, so nothing loads from them until the visitor agrees.

PHPIntermediate
View

Clean up after privacy requests

WordPress keeps completed export and erasure requests, including the email address of the person who asked. Once a request is done, there’s no reason to keep that. This deletes them 30 days after completion:

Snippet

Delete Old Completed Privacy Requests

Automatically delete export and erasure requests 30 days after they're completed, along with their email addresses.

PHPIntermediate
View

Store-less checklist

0 / 10

Summary

Start with comments, where WordPress collects the most: stop storing browser details, remove the website field and comment cookies, and either drop IP addresses or anonymise them after a few weeks. Replace Gravatar with local avatars, stop storing session IPs, load embeds on click and delete completed privacy requests. Then update your privacy policy so it matches.

Was this helpful?

Written by Nahnu Plugins

We build and maintain WordPress plugins. Every guide is tested on a fresh WordPress site before it goes out, and checked again when WordPress updates.

More guides

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only