在复制到本地主机后,WordPress始终将重定向到https [英] Wordpress always redirects to https after copying to localhost

查看:102
本文介绍了在复制到本地主机后,WordPress始终将重定向到https的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将我的wordpress安装从服务器复制到本地Web服务器(MAMP)并尝试访问localhost:8888时,它将始终将http重定向到https.所以我总是得到一个ERR_SSL_PROTOCOL_ERROR.
我在任何地方都找不到此设置-在数据库中或在wordpress文件中的其他地方都找不到.有人可以帮忙吗?

When I copy my wordpress installation from server to a local webserver (MAMP) and try to access localhost:8888, it always redirects http to https. So I always get an ERR_SSL_PROTOCOL_ERROR.
I can't find the setting for this anywhere – neither in the database nor somewhere else in the wordpress files. Can anybody help?

推荐答案

请确保将WP_HOMEWP_SITEURL设置为以http而不是https开头的地址.

Make sure that WP_HOME and WP_SITEURL are set to addresses that start with http, not https.

这些设置应该位于wp-config.php中.

define('WP_HOME','http://localhost:8888');
define('WP_SITEURL','http://localhost:8888');

确保您没有告诉WordPress强制SSL进行管理员和登录.

Make sure you aren't telling WordPress to force SSL for admin and login.

define('FORCE_SSL_LOGIN',false);
define('FORCE_SSL_ADMIN',false);

这篇关于在复制到本地主机后,WordPress始终将重定向到https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆