WordPress: Login Trouble:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: If you are having trouble logging in to your WordPress Administration Panels, here are some possible solutions. == Enable Cookies == Make sure that cookies are enabled for your brow...)
 
无编辑摘要
第1行: 第1行:
If you are having trouble logging in to your WordPress [[Administration Panels]], here are some possible solutions.
If you are having trouble logging in to your WordPress [[Wordpress:Administration Panels]], here are some possible solutions.


== Enable Cookies ==
== Enable Cookies ==
第10行: 第10行:
== Disable Plugins ==
== Disable Plugins ==


Some [[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.
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.


== New Login File ==
== New Login File ==
第16行: 第16行:
Sometimes the <tt>wp-login.php</tt> file may have been corrupted or uploaded incorrectly.
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 [[FTP Clients|FTP]] can lead to incomplete transfers.
* 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:
* Edit <tt>wp-login.php</tt> as follows:
** Go to the <tt>case retrievepassword</tt> section, found under this comment:  
** Go to the <tt>case retrievepassword</tt> section, found under this comment:  
第27行: 第27行:
== Edit Users Table ==
== Edit Users Table ==


[[WordPress_Backups#Accessing_phpMyAdmin|Access your site's phpMyAdmin]] and edit the database carefully.
[[Wordpress:WordPress_Backups#Accessing_phpMyAdmin|Access your site's phpMyAdmin]] and edit the database carefully.


* Open the WordPress database.
* Open the WordPress database.
第39行: 第39行:
* Log in to WordPress using "admin" and the password you used to create the hash.
* Log in to WordPress using "admin" and the password you used to create the hash.


For more information, see [[Resetting Your Password]].
For more information, see [[Wordpress:Resetting Your Password]].


== Problems with Password ==
== Problems with Password ==


For information on problems logging in due to a wrong or lost password, see [[Resetting Your Password]].
For information on problems logging in due to a wrong or lost password, see [[Wordpress:Resetting Your Password]].


Please remember, the Username and Password fields are case sensitive!
Please remember, the Username and Password fields are case sensitive!
第73行: 第73行:
== Headers Already Sent ==
== Headers Already Sent ==


If you get an error about '''headers already sent''', see [[FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F|Solving the Headers Already Being Sent Problem]] in the [[FAQ]].
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 ==
== 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'' [[Glossary|MySQL]] table might still result in login failure.  
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
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
第84行: 第84行:


== If All Else Fails ==
== If All Else Fails ==
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 [[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.
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月24日 (一) 09:12的版本

If you are having trouble logging in to your WordPress Wordpress:Administration Panels, here are some possible solutions.

Enable Cookies

Make sure that cookies are enabled for your browser.

  • Clear your browser cookies.
  • Clear your browser cache.

Disable Plugins

Some 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 /wp-content/plugins/ folder, so they will not be recognized by the program.

New Login File

Sometimes the wp-login.php file may have been corrupted or uploaded incorrectly.

  • Delete wp-login.php off of your server and upload a new copy from a fresh WordPress download. Remember, overwriting file via FTP can lead to incomplete transfers.
  • Edit wp-login.php as follows:
    • Go to the case retrievepassword section, found under this comment:
// redefining user_login ensures we return the right case in the email
Replace:
$user_login = $user_data["user_login"];
With:
$user_login = $user_data->user_login;

Edit Users Table

Access your site's phpMyAdmin and edit the database carefully.

  • Open the WordPress database.
  • Click on the users table in the left menu (default is wp_users, or yourprefix_users if you defined a different table prefix.)
  • Click BROWSE.
  • Click on the EDIT button next to the admin user.
  • Delete whatever is in the password field.
  • Using the md5 hasher, enter your desired password, and copy the hash that it generates.
  • Paste the hash in the password field for user admin.
  • Save the info in the database.
  • Log in to WordPress using "admin" and the password you used to create the hash.

For more information, see Wordpress:Resetting Your Password.

Problems with Password

For information on problems logging in due to a wrong or lost password, see Wordpress:Resetting Your Password.

Please remember, the Username and Password fields are case sensitive!

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 here.
  • Is it set as http:/?
  • 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:
// If someone has moved WordPress let's try to detect it
//if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') )
 // update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );

Secure HTTPS

If you are having a problem with secure HTTPS, change the following line in wp-includes/vars.php from:

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

To:

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

Be sure also to change the URL in OPTIONS to https://.

Headers Already Sent

If you get an error about headers already sent, see 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 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

If these steps fail, please indicate that you have tried all these possible solutions when posting at the WordPress Support Forum. Be sure to give 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.


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