简体   繁体   English

Wordpress在localhost上发出太多重定向问题

[英]Wordpress too many redirects issue on localhost

I am facing the issue as described in the title. 我正面临标题中描述的问题。 I am working on a Woocommerce site with default WP Twenty Nineteen. 我正在使用默认WP Twenty Nineteen的Woocommerce网站。 Everything was working fine but I have mistyped https in the WP admin General Settings Site Url field. 一切都运行正常,但我在WP管理员常规设置网站网址字段中输错了https。 This caused too_many_redirects error on both Chrome and Mozilla. 这导致Chrome和Mozilla上出现too_many_redirects错误。 I have tried clearing cookies and complete browsing data, disabling plugins, changing permalinks and deleting htaccess file but none of this worked. 我已经尝试清除cookie并完成浏览数据,禁用插件,更改永久链接和删除htaccess文件,但这些都没有奏效。 Maybe this can help but strangely I can access admin but cannot see none of the pages. 也许这可以帮助但奇怪的是我可以访问管理员,但不能看到任何页面。 Any help would be appreciated. 任何帮助,将不胜感激。 Thanks! 谢谢!

In wp-config.php add this 2 lines (with your protocol+domain_name): 在wp-config.php中添加这两行(使用您的协议+ domain_name):

define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');

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

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