I recently moved my site built in Word Press to another hosting provider and I found the shortcode [woocommerce_my_account] is not working anymore.
Previously, I had a page called account login where I had the shortcode [woocommerce_my_account]
. In the settings I set the landing page to be the same page (account login). so, after an user logged in, it was redirected to the same page showing his/her details.
However, in the new hosting provider this is no longer working. After I put the login information and attempt to login it is taking me to wp-login.php
page and ask me to enter my login details again.
The URL path that I see in the browser after attempting to login is similar to this <site_name_url>/wp-login.php?redirect_to=http://<site_name_url>/account-login/
Anybody has got to the bottom of this issue? Thank you.
Try adding this to your
wp-config.php
:Make sure you change
http://example.com
with your own domaine. You can also try to search and replace your domaine in the database if it has changed.You can also try to clear browser cache and cookies. I had an issue like this before, launched a private navigation and it was working fine.
Try setting
define(âWP_DEBUGâ, true);
, you may see something going on.Sometimes, php version makes a difference, try to set the same php version on you new host (google the name of your hosting provider + change php version).
When you move sites/restore databases you often need to save the permalinks again.
go to
/wp-admin/options-permalink.php
and click “save”. This will setup your .htaccess file with the correct information for redirects.Finally, after all of these days searching and trying different things, the answer for this issue in my case was not related with the Word Press installation itself but, with some software installed on the server called
varnish
, apparently used to cache the site and improve its performance.After having a support chat with the hosting provider, they mentioned that varnish is breaking the woocommerce plugin.
At this point, I am not sure if
varnish
is not compatible with woocommerce or the settings applied on the server using this software make woocommerce not to work properly.