Woocommerce_my_account stops working after switching to another hosting provider

I recently transferred my Word Press site to another hosting provider and I found that the [woocommerce_my_account] shortcode no longer works.

I used to have an account name page where I had a shortcode [woocommerce_my_account]

. In the settings, I set the landing page to one page (account login). therefore, after the user logged in, he was redirected to the same page with his / her details.

However, in the new hosting provider, this no longer works. After I put my registration information and try to login, it will take me to a page wp-login.php

and ask me to enter my login details again.

The url I see in the browser after trying to login is like this <site_name_url>/wp-login.php?redirect_to=http://<site_name_url>/account-login/

Has anyone gotten to the bottom of this issue? Thank.

+3


source to share


3 answers


Try adding this to yours wp-config.php

:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

      



  • Make sure you change http://example.com

    to your own domain. You can also try to find and replace your domain in the database if it has changed.

  • You can also try clearing your browser cache and cookies. I had a problem like this before, started private navigation and it worked fine.

  • Try to install define(β€˜WP_DEBUG’, true);

    , you can see something happening.

  • Sometimes php version matters, try installing the same php version on your new host (google your hosting provider name + change php version).

+2


source


When you move sites / restore databases, you often need to save permalinks again.



go to /wp-admin/options-permalink.php

and click save. This will set your .htaccess file with the correct redirect information.

0


source


Finally, after all these days looking and trying different things, the answer to this question in my case was not related to installing Word Press, but with some software installed on the server called varnish

apparently cache the site and improve its performance. After maintaining a chat with the hosting provider, they mentioned that varnish is breaking the woocommerce plugin.

At this point I am not sure if it is varnish

incompatible with woocommerce or the settings applied on the server using this software so that woocommerce does not work as expected.

0


source







All Articles