简体   繁体   English

分期 Wordpress 显示 WooCommerce 的 404

[英]Staging Wordpress shows 404 for WooCommerce Products & Categories

I have a Wordpress site with Woocommerce.我有一个带有 Woocommerce 的 Wordpress 站点。 For the past years, I have been creating staging environment through Softaculous interface, do the updates in my staging environment and then push them to the live site.在过去的几年里,我一直在通过 Softaculous 界面创建 staging 环境,在我的 staging 环境中进行更新,然后将它们推送到实时站点。

However, recently I came across an issue with WooCommerce products and I can't seem to find a way to fix it.但是,最近我遇到了 WooCommerce 产品的问题,我似乎找不到解决方法。 Basically when I add a new product to WooCommerce and try to preview it on the staging site, I get a 404 No Results Found.基本上,当我向 WooCommerce 添加新产品并尝试在暂存站点上预览它时,我得到 404 No Results Found。 The product category pages are also not working and some of the pages are redirecting me to the live site.产品类别页面也无法正常工作,并且某些页面将我重定向到实时站点。

I have:我有:

  1. tried creating a new staging site in case something went wrong尝试创建一个新的临时站点以防出现问题
  2. disabled all plugins except WooCommerce禁用除 WooCommerce 以外的所有插件
  3. updating permalinks in case something went wrong更新永久链接以防出现问题
  4. confirmed that the URL确认 URL
  5. verified that the wp-config is correct for staging environment验证 wp-config 是否适用于暂存环境
  6. confirmed with hosting company that requests are hitting the correct database, though there are no other logs from their end与托管公司确认请求正在访问正确的数据库,尽管他们没有其他日志
  7. have purged cloudflare cache and also enabled development mode after just in case已清除 cloudflare 缓存并在以防万一之后启用了开发模式

All the above however have not fixed the issue and at this point I am pretty much clueless at what might be the issue.然而,以上所有都没有解决这个问题,在这一点上,我对可能是什么问题一无所知。 Is there anything else that I should look for or anyone ever encountered this issue?还有什么我应该寻找的或者有人遇到过这个问题吗?

Edit : I am on the latest versions of WordPress and WooCommerce.编辑:我使用的是最新版本的 WordPress 和 WooCommerce。 All other plugins are up to date as well (though disabled at this point).所有其他插件也是最新的(尽管此时已禁用)。

Thanks谢谢

I managed to find the root culprit which was leading to this behaviour.我设法找到了导致这种行为的根本罪魁祸首。 The SSL certificate had expired and hence when you try to load the staging site, Cloudflare was redirecting me to the live site. SSL 证书已过期,因此当您尝试加载暂存站点时,Cloudflare 将我重定向到实时站点。

Once the SSL was renewed, all started working fine as before.更新 SSL 后,一切都像以前一样开始正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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