V
V
Vitaly Mironov2019-10-04 10:49:19
HTTP Cookies
Vitaly Mironov, 2019-10-04 10:49:19

How to make shared cookies on subdomains in Wordpress?

There is a site, it has subdomains. Going to each site you need to register separately, you need to fix it.
I tried to prescribe in wp-config: and but it does not help. Tell me what can be done.
define( 'COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );
define( 'COOKIE_DOMAIN', domain.ru );

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2019-10-04
@HeadOnFire

Add to wp-config.php:

define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

And clear cache and cookies.
Do you have multisite?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question