WordPress: Login Trouble:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
(未显示另一用户的1个中间版本)
第1行: 第1行:
If you are having trouble logging in to your WordPress [[Wordpress:Administration Panels]], here are some possible solutions.
如果你有困难登录到WordPress[[Wordpress:Administration Panels|管理面板]],下面是一些可能用到的解决办法。
 
== 启用Cookies ==
== Enable Cookies ==
确保你的浏览器能够启用cookies.
 
*清除你的浏览器cookies.
Make sure that cookies are enabled for your browser.
*清除你的浏览器高速缓冲存储。
 
==使插件处于没用的状态 ==
* Clear your browser cookies.
一些[[Wordpress:Plugins|WordPress 插件]]可能干预登录过程。通过管理面板,或者通过将插件从<tt>/wp-content/plugins/</tt>文件夹中移走,来使WordPress的所有插件不起作用,这样程序就不能识别插件了。
* Clear your browser cache.
==新的登录文件 ==
 
有时<tt>wp-login.php</tt>文件可能已经毁坏了或者错误地上传了。
== Disable Plugins ==
* 从你的服务器上删除掉<tt>wp-login.php</tt>并且从一个刷新的WordPress下载文件中,上传一个新的复制的文件。注意通过[[Wordpress:FTP Clients|FTP]]写的过多的文件可能会导致不完全的转移。
 
*<tt>wp-login.php</tt>编辑为以下的形式:
Some [[Wordpress:Plugins|WordPress Plugins]] may interfere with the login process. Disable all of your WordPress Plugins, either through the admin panel or by removing them from the <tt>/wp-content/plugins/</tt> folder, so they will not be recognized by the program.
** 转到<tt>case 重新得到密码</tt>部分,在这个评论下找到:
 
  //从新定义用户_登录确保我们将正确的case返回到了邮件中。
== New Login File ==
::替换:
 
Sometimes the <tt>wp-login.php</tt> file may have been corrupted or uploaded incorrectly.
 
* Delete <tt>wp-login.php</tt> off of your server and upload a new copy from a fresh WordPress download. Remember, overwriting file via [[Wordpress:FTP Clients|FTP]] can lead to incomplete transfers.
* Edit <tt>wp-login.php</tt> as follows:
** Go to the <tt>case retrievepassword</tt> section, found under this comment:
  // redefining user_login ensures we return the right case in the email
::Replace:
  $user_login = $user_data["user_login"];
  $user_login = $user_data["user_login"];
::With:
:::
  $user_login = $user_data->user_login;
  $user_login = $user_data->user_login;
 
== 编辑用户列表 ==
== Edit Users Table ==
[[Wordpress:WordPress_Backups#Accessing_phpMyAdmin|进入你的站点的 phpMyAdmin]] 并且仔细地编辑数据库。
 
* 打开WordPress数据库
[[Wordpress:WordPress_Backups#Accessing_phpMyAdmin|Access your site's phpMyAdmin]] and edit the database carefully.
* 点击一下左边菜单里的用户表(如果你确定了一个不同的表格前缀,默认情况下是<tt>wp_users</tt>, or <tt>''yourprefix''_users </tt>
 
* 点击'''浏览'''
* Open the WordPress database.
* 点中管理用户旁边的'''EDIT'''
* Click on the users table in the left menu (default is <tt>wp_users</tt>, or <tt>''yourprefix''_users </tt> if you defined a different table prefix.)
* 删除密码栏中所有的内容。
* Click '''BROWSE'''.
* 使用[http://bfl.rctek.com/tools/?tool=hasher md5 hasher],输入你想要的密码,并且复制一些随之产生的无用信息。
* Click on the '''EDIT''' button next to the admin user.
* 在用户<tt>admin</tt>.的密码栏中粘贴这些无用信息。
* Delete whatever is in the password field.
* 在数据库中保存信息。
* Using the [http://bfl.rctek.com/tools/?tool=hasher md5 hasher], enter your desired password, and copy the hash that it generates.
* 使用"admin"和你用来创建无用信息的密码来登录到WordPress
* Paste the hash in the password field for user <tt>admin</tt>.
更多信息请看,[[Wordpress:Resetting Your Password|重新设定你的密码]]
* Save the info in the database.
== 与密码相关的问题==
* Log in to WordPress using "admin" and the password you used to create the hash.
关于因为密码错误或者密码丢失而引起的登录问题,请看[[Wordpress:Resetting Your Password|重新设置你的密码]].
 
请记住,用户名和密码栏是要求区分大小写的!
For more information, see [[Wordpress:Resetting Your Password]].
== 改变 URL 站点 ==
 
在某些情况下,你的WordPress地址URI也许要重新设置.
== Problems with Password ==
*在你的WordPress数据库的''wp-options''中核实一下'''siteurl'''.[http://www.tamba2.org.uk/wordpress/site-url/ 这儿].可以找到怎样做的指南.
 
*把它设置成了<tt><nowiki>http:/</nowiki></tt>?
For information on problems logging in due to a wrong or lost password, see [[Wordpress:Resetting Your Password]].
*如果是的话,就将'''site_url'''改为正确的值.
 
*在一个文本编辑器中打开''wp-login.php'',评论或者删除下面这些行:
Please remember, the Username and Password fields are case sensitive!
<pre>// 如果有人移动了WordPress, 我们试着将它删除掉.
 
== Site URL Redirecting ==
In certain cases your WordPress address URI may have been reset.
 
*Check the '''siteurl''' value in the ''wp-options'' table of your WordPress database. A guide to doing this is available [http://www.tamba2.org.uk/wordpress/site-url/ here].
*Is it set as <tt><nowiki>http:/</nowiki></tt>?
*If it is, change '''site_url''' to the correct value.
*Open ''wp-login.php'' in a text-editor and comment or delete the following lines:
 
<pre>// If someone has moved WordPress let's try to detect it
//if ( dirname('<nowiki>http://</nowiki>' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') )
//if ( dirname('<nowiki>http://</nowiki>' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') )
  // update_option('siteurl', dirname('<nowiki>http://</nowiki>' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );</pre>
  // 更新选择('siteurl', dirname('<nowiki>http://</nowiki>' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );</pre>
 
== 保护 HTTPS ==
== Secure HTTPS ==
如果你有保护HTTPS方面的问题,请将下面<tt>wp-includes/vars.php</tt>的行,从:
 
If you are having a problem with secure HTTPS, change the following line in <tt>wp-includes/vars.php</tt> from:  
 
<pre><nowiki>define('COOKIEPATH', preg_replace('|http://[^/]+|i', '', get_settings('home') . '/' ) );</nowiki></pre>
<pre><nowiki>define('COOKIEPATH', preg_replace('|http://[^/]+|i', '', get_settings('home') . '/' ) );</nowiki></pre>
 
改为:
To:
 
<pre><nowiki>define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('home') . '/' ) );</nowiki></pre>
<pre><nowiki>define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('home') . '/' ) );</nowiki></pre>
确保将OPTIONS中的URL改为<nowiki>https://</nowiki>.
== 头文件已经发出 ==
如果你遇到了一个'''头文件已经发出'''的错误,在[[Wordpress:FAQ|常见问题解答]]上看一下[[Wordpress:FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F|解决头文件已经发出的问题]]
== 检查你的URL 选项 ==
在一些情形下,从你的域里可以看见你的博客,但从域外就看不见了.遵循以上关于改变''wp-选项'' [[Wordpress:Glossary|MySQL]]表的说明,可能仍然登录不了.
在这种情况下,双重选择你的''wp-选项''表'''siteurl'''(WordPress 地址 URL)和'''主页'''(博客地址URL)值,确保它们提及了'''同一个'''对外的基数:例如,. http:/blog.yourdomain.com.标准的安装可能把它们设置为你的本地的(内在的)主机名,像http://servername
==检查你的防火墙 ==
一些防火墙(例如, eTrust Personal 防火墙)阻止你登录到WordPress.禁用你的防火墙,并且尝试再次登录.


Be sure also to change the URL in OPTIONS to <nowiki>https://</nowiki>.
==如果所有其它的措施失败 ==
 
== Headers Already Sent ==
 
If you get an error about '''headers already sent''', see [[Wordpress:FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F|Solving the Headers Already Being Sent Problem]] in the [[Wordpress:FAQ]].
 
== Check Your URL Options ==
In some situations, your blog can be seen from inside your domain, but not outside. Following the instruction above about changing the ''wp-options'' [[Wordpress:Glossary|MySQL]] table might still result in login failure.
 
In this event, double-check your ''wp-options'' table '''siteurl''' (WordPress address URL) and '''home''' (Blog Address URL) values to make sure they reference the '''same''' base externally available address; i.e., http:/blog.yourdomain.com. The standard install may set them to your local (internal) host name, such as http://servername
 
== Check your Firewall ==
Some firewalls (e.g., eTrust Personal Firewall) block you from logging in to WordPress. Disable your firewall and try to log in again.


== If All Else Fails ==
当这些步骤都失败了,当你在[http://wordpress.org/support WordPress 支持论坛]上发帖时,请表明你已经尝试了这些可能的解决办法.如果你知道的话,确保你提供了[[Wordpress:Finding_Server_Info|你的服务器设置的详细信息]],包括mySQL,PHP版本,你的操作系统(OS),浏览器和造成这些麻烦的WOrdPress版本。
If these steps fail, please indicate that you have tried all these possible solutions when posting at the [http://wordpress.org/support WordPress Support Forum]. Be sure to give [[Wordpress:Finding_Server_Info|details of your server setup]], if you know it, including mySQL and PHP versions, as well as your operating system (OS), browser, and the WordPress version that is causing these problems.




{{Copyedit}}
{{Copyedit}}

2008年3月29日 (六) 15:25的最新版本

如果你有困难登录到WordPress管理面板,下面是一些可能用到的解决办法。

启用Cookies[ ]

确保你的浏览器能够启用cookies.

  • 清除你的浏览器cookies.
  • 清除你的浏览器高速缓冲存储。

使插件处于没用的状态[ ]

一些WordPress 插件可能干预登录过程。通过管理面板,或者通过将插件从/wp-content/plugins/文件夹中移走,来使WordPress的所有插件不起作用,这样程序就不能识别插件了。

新的登录文件[ ]

有时wp-login.php文件可能已经毁坏了或者错误地上传了。

  • 从你的服务器上删除掉wp-login.php并且从一个刷新的WordPress下载文件中,上传一个新的复制的文件。注意通过FTP写的过多的文件可能会导致不完全的转移。
  • wp-login.php编辑为以下的形式:
    • 转到case 重新得到密码部分,在这个评论下找到:
//从新定义用户_登录确保我们将正确的case返回到了邮件中。
替换:
$user_login = $user_data["user_login"];
为:
$user_login = $user_data->user_login;

编辑用户列表[ ]

进入你的站点的 phpMyAdmin 并且仔细地编辑数据库。

  • 打开WordPress数据库
  • 点击一下左边菜单里的用户表(如果你确定了一个不同的表格前缀,默认情况下是wp_users, or yourprefix_users
  • 点击浏览
  • 点中管理用户旁边的EDIT
  • 删除密码栏中所有的内容。
  • 使用md5 hasher,输入你想要的密码,并且复制一些随之产生的无用信息。
  • 在用户admin.的密码栏中粘贴这些无用信息。
  • 在数据库中保存信息。
  • 使用"admin"和你用来创建无用信息的密码来登录到WordPress

更多信息请看,重新设定你的密码

与密码相关的问题[ ]

关于因为密码错误或者密码丢失而引起的登录问题,请看重新设置你的密码. 请记住,用户名和密码栏是要求区分大小写的!

改变 URL 站点[ ]

在某些情况下,你的WordPress地址URI也许要重新设置.

  • 在你的WordPress数据库的wp-options中核实一下siteurl值.在这儿.可以找到怎样做的指南.
  • 把它设置成了http:/?
  • 如果是的话,就将site_url改为正确的值.
  • 在一个文本编辑器中打开wp-login.php,评论或者删除下面这些行:
// 如果有人移动了WordPress, 我们试着将它删除掉.
//if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') )
 // 更新选择('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );

保护 HTTPS[ ]

如果你有保护HTTPS方面的问题,请将下面wp-includes/vars.php的行,从:

define('COOKIEPATH', preg_replace('|http://[^/]+|i', '', get_settings('home') . '/' ) );

改为:

define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('home') . '/' ) );

确保将OPTIONS中的URL改为https://.

头文件已经发出[ ]

如果你遇到了一个头文件已经发出的错误,在常见问题解答上看一下解决头文件已经发出的问题

检查你的URL 选项[ ]

在一些情形下,从你的域里可以看见你的博客,但从域外就看不见了.遵循以上关于改变wp-选项 MySQL表的说明,可能仍然登录不了. 在这种情况下,双重选择你的wp-选项siteurl(WordPress 地址 URL)和主页(博客地址URL)值,确保它们提及了同一个对外的基数:例如,. http:/blog.yourdomain.com.标准的安装可能把它们设置为你的本地的(内在的)主机名,像http://servername

检查你的防火墙[ ]

一些防火墙(例如, eTrust Personal 防火墙)阻止你登录到WordPress.禁用你的防火墙,并且尝试再次登录.

如果所有其它的措施失败[ ]

当这些步骤都失败了,当你在WordPress 支持论坛上发帖时,请表明你已经尝试了这些可能的解决办法.如果你知道的话,确保你提供了你的服务器设置的详细信息,包括mySQL,PHP版本,你的操作系统(OS),浏览器和造成这些麻烦的WOrdPress版本。


This article is [[WordPress::Category:Copyedits|marked]] as in need of editing. You can help Codex by editing it.