After opening multiple sites in WordPress, the solution is to solve the problem that some site backends cannot log in normally and keep jumping back to the login page.

888u

Last update at :2024-07-06,Edit by888u

For a WordPress website with multi-site mode turned on, the backend of some sites cannot log in normally and always jumps back to the login page. The login url becomes: http://www.xxx.com/wp-login.php?redirect_to =http://www.xxx.com/wp%2Dadmin/&reauth=1, the solution is to modify WordPress Cookies settings.

Open the theme's functions.php file, add the following code at the end of the file and log in again.

setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
if ( SITECOOKIEPATH != COOKIEPATH ) setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);

Recommended site search: proxy service IP, website ICP registration, what is the server, check whether the domain name is registered, check IP online, free virtual host application, US vps server, domain name space agent, domain name agent, VIP domain name,

After opening multiple sites in WordPress, the solution is to solve the problem that some site backends cannot log in normally and keep jumping back to the login page.

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码