本地主机上的WordPress(LAMP)-无法登录,只能重定向到wp-login.php

时间:2020-07-15 作者:Don Flannagan

我在我的新笔记本电脑上安装了一个LAMP服务器,并从实时服务器下载了一个网站到我的本地机器。一切似乎都正常,但当我转到时,我无法登录http://localhost/mysite/wp-login.php并输入正确的详细信息,它只会重定向回wp登录。没有实际登录的php。

我在本地机器上安装了一个新的WordPress,所以它是一个新的wp配置文件。

我确保了wp\\u选项中的站点URL是正确的,我确保了用户名和密码是正确的,我尝试下载了。htaccess文件,我尝试在WP配置中定义WP\\u HOME和WP\\u SITEURL。php文件。我尝试将浏览器改为Chrome(它没有扩展,也没有cookie或历史记录,我从不使用Chrome)。

我尝试添加:

define(\'FORCE_SSL_ADMIN\', false);
至wp配置。php。我尝试删除所有插件。

我不知道还能尝试什么,也不知道如何诊断问题。

1 个回复
SO网友:Don Flannagan

所以我在wp配置中更改了这个。php文件:

define( \'AUTH_KEY\',         \'put your unique phrase here\' );
define( \'SECURE_AUTH_KEY\',  \'put your unique phrase here\' );
define( \'LOGGED_IN_KEY\',    \'put your unique phrase here\' );
define( \'NONCE_KEY\',        \'put your unique phrase here\' );
define( \'AUTH_SALT\',        \'put your unique phrase here\' );
define( \'SECURE_AUTH_SALT\', \'put your unique phrase here\' );
define( \'LOGGED_IN_SALT\',   \'put your unique phrase here\' );
define( \'NONCE_SALT\',       \'put your unique phrase here\' );
并添加了wp配置中的所有哈希。php文件,现在可以工作了。

相关推荐

Add content in wp login page

我已经根据我的自定义主题自定义了我的wp登录页面。我想在我的wp登录页面中添加一个内容框,如果用户没有在网站上注册帐户,该内容框会邀请用户浏览我的自定义注册页面。我搜索了很多,但对我来说没有任何选择,我不想优先使用插件。如果您知道如何在wp登录页面中添加内容,请提前感谢。