简体   繁体   中英

Unable to login/register from My account page in woocommerce

I am trying to setup this theme. Every thing was working fine but when i moved my site to this new host at BLUEHOST.

Suddenly my i am not able to login using word press social login.

So did some research that Varnish caching may be the issue. But this social login is not the issue now.

Main Problem Now i am not able to login using my account page. When a user registers he is registered in the backend but not automatically logged in.

So what is the issue please help

Have you checked your varnish settings against the woocommerce documentation? http://docs.woothemes.com/document/configuring-caching-plugins/

if (req.url ~ "^/(cart|my-account|checkout|addons)") {
 return (pass);
}
if ( req.url ~ "\?add-to-cart=" ) {
  return (pass);
 }

Also mentioned in the article a possible issue with cookies and varnish

Add this to vcl_recv above "if (req.http.cookie) {":

# Unset Cookies except for WordPress admin and WooCommerce pages 
if (!(req.url ~ "(wp-login|wp-admin|cart|my-account/*|checkout|addons|logout|lost-password|product/*)")) { 
unset req.http.cookie; 
} 
# Pass through the WooCommerce dynamic pages 
if (req.url ~ "^/(cart|my-account/*|checkout|addons|logout|lost-password|product/*)") { 
return (pass); 
} 
# Pass through the WooCommerce add to cart 
if (req.url ~ "\?add-to-cart=" ) { 
return (pass); 
} 
# Block access to php admin pages via website 
if (req.url ~ "^/phpmyadmin/.*$" || req.url ~ "^/phppgadmin/.*$" || req.url ~ "^/server-status.*$") { 
error 403 "For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname"; 
} 
#

Add this to vcl_fetch:

# Unset Cookies except for WordPress admin and WooCommerce pages 
if ( (!(req.url ~ "(wp-(login|admin)|login|cart|my-account/*|checkout|addons|logout|lost-password|product/*)")) || (req.request == "GET") ) { 
unset beresp.http.set-cookie; 
} 
#

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM