简体   繁体   中英

Woocommerce shop page redirects to wp-admin

At some point, the shop page started to redirect to the wp-admin (admin backend) page. I don't know why.

Commonly proposed solutions include:

  1. Delete the shop page, and add it again using the WC > Status > Tools > Create default WooCommerce pages.
  2. Make sure the WP URLs are set correctly.

Neither had any effect. The shop page URL is currently at https://website.com/?page_id=88 , reflecting the number of times I tried remaking default pages.

I have also tried adding some text to the page, though it should normally be empty. This had no effect.

Ran out of ideas to try. The rest of the website mostly works.

Possibly related annoyance bug: the shop automatically adds the first product to the cart whenever one visits the site. Somewhat annoying, but not disastrous.

Versions:

  • WooCommerce 3.2.6
  • Wordpress 4.9.1

The bug seems to be fixed by changing the Home page to the Shop page in the WP settings > reading.

在此处输入图片说明

Unfortunately, this workaround doesn't fix the underlying issue entirely because the bug resurfaces if one selects the front page instead of the shop as the home page.

I'm not able to add a question/comment, so I'll try to add this as an answer...

If you are using IIS and have setup your site as a virtual application, this may cause this error. I had this same thing during testing. Once I created the website as it's own proper website and accessed it properly, this fixed the issue for me.

我有这个问题并修复它清除浏览器缓存我希望它有帮助

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