Title: Cookies
Published: March 28, 2023
Last modified: October 14, 2026

---

# Cookies

## In this article

 * [Enable Cookies in Your Browser](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#enable-cookies-in-your-browser)
 * [User’s Cookie](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#users-cookie)
    - [Non-Version-Specific Data](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#non-version-specific-data)
 * [Commenter’s Cookie](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#commenters-cookie)
 * [WordPress Test Cookie](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#wordpress-test-cookie)
 * [Language Cookie](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#language-cookie)
 * [References](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#references)

WordPress uses cookies, or tiny pieces of information stored on your computer, to
verify who you are. There are cookies for logged in users and for commenters.

## 󠀁[Enable Cookies in Your Browser](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#enable-cookies-in-your-browser)󠁿

WordPress uses cookies for authentication. That means that in order to log in to
your WordPress site, you must have cookies enabled in your browser.

You can find information on how to manage those for the most popular browsers here:
–
[Google Chrome](https://support.google.com/chrome/answer/95647) – [Mozilla Firefox](https://support.mozilla.org/en-US/kb/enable-and-disable-cookies-website-preferences)–
[Microsoft Edge](https://privacy.microsoft.com/en-us/windows-10-microsoft-edge-and-privacy)–
[Safari](https://support.apple.com/guide/safari/manage-cookies-and-website-data-sfri11471/mac)–
[Opera](https://help.opera.com/en/latest/web-preferences/#cookies) – [Brave](https://brave.com/privacy/browser/)

## 󠀁[User’s Cookie](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#users-cookie)󠁿

Users are those people who have registered an account with the WordPress site.

On login, WordPress uses the `wordpress_[hash]` cookie to store your authentication
details. Its use is limited to the Administration Screen area, `/wp-admin/`.

After login, WordPress sets the `wordpress_logged_in_[hash]` cookie, which indicates
when you’re logged in, and who you are, for most interface use.

WordPress also sets a few `wp-settings-{time}-[UID]` cookies. The number on the 
end is your individual user ID from the users database table. This is used to customize
your view of admin interface, and possibly also the main site interface.

The cookies lifetime can be adjusted with the `auth_cookie_expiration` hook. An 
example of this can be found at [what’s the easiest way to stop wp from ever logging me out](https://wordpress.stackexchange.com/questions/515/whats-the-easiest-way-to-stop-wp-from-ever-logging-me-out).

### 󠀁[Non-Version-Specific Data](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#non-version-specific-data)󠁿

The actual cookies contain your username, the expiration time and _hashed_ data 
that ensures you have a valid session. A _hash_ is the result of a specific mathematical
formula applied to some data. In case of these cookies, only 4 characters of your
hashed password are stored in a hash in your cookie. This ensures that it is impossible
to retrieve your password from the cookie. It also ensures that any cookie will 
invalidated whenever your password is changed.

WordPress uses the two cookies to bypass the password entry portion of `wp-login.
php`. If WordPress recognizes that you have valid, non-expired cookies, you go directly
to the [WordPress Administration Screen](https://wordpress.org/documentation/article/administration-screens).
If you don’t have the cookies, or they’re expired, or in some other way invalid (
like you edited them manually for some reason), WordPress will require you to log
in again, in order to obtain new cookies.

## 󠀁[Commenter’s Cookie](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#commenters-cookie)󠁿

When visitors comment on your blog, they get cookies stored on their computers too.
This is purely a convenience, so that the visitor won’t need to re-type all their
information again when they want to leave another comment. Three cookies are set
for commenters:

 * `comment_author_{HASH}`
 * `comment_author_email_{HASH}`
 * `comment_author_url_{HASH}`

The commenter cookies are set to expire a little under one year from the time they’re
set.

## 󠀁[WordPress Test Cookie](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#wordpress-test-cookie)󠁿

WordPress will set a temporary cookie named `wordpress_test_cookie` which is to 
probe the ability of WordPress to set cookies. If writing this cookie fails, you
will get the following error message “Cookies are blocked or not supported by your
browser.”

In case you get this after moving your website, always try to delete your cookies
and if you are using a caching plugin, the server cache. This will solve temporary
issues.

## 󠀁[Language Cookie](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#language-cookie)󠁿

WordPress allows you to alter the language of all translatable strings on login.
For this measure WordPress will set a cookie named `wp_lang` which is a session 
cookie and will store the language key of the selected language.

## 󠀁[References](https://developer.wordpress.org/advanced-administration/wordpress/cookies/?output_format=md#references)󠁿

 * [Wikipedia: Cookies](https://en.wikipedia.org/wiki/HTTP_cookie)
 * [RFC2965](http://www.faqs.org/rfcs/rfc2965.html)
 * [PHP cookie documentation](https://www.php.net/manual/en/features.cookies.php)

First published

March 28, 2023

Last updated

October 14, 2026

Edit article

[ Improve it on GitHub: Cookies ](https://github.com/WordPress/Advanced-administration-handbook/edit/main/wordpress/cookies.md)

Changelog

[ See list of changes: Cookies ](https://github.com/WordPress/Advanced-administration-handbook/commits/main/wordpress/cookies.md)

[  Previous: Post Formats](https://developer.wordpress.org/advanced-administration/wordpress/post-formats/)

[  Next: Update Services](https://developer.wordpress.org/advanced-administration/wordpress/update-services/)