Login Trouble

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

Enable Cookies

In order to make sure that cookies are enabled for your browser, you need to:

  1. Clear your browser cookies.
  2. Clear your browser cache.

To see how to clear cookies and caches on various browsers, visit Clearing Cache and Cookies.

WordPress MultiSite Network

  • Check your wp-config.php file.
  • Verify the DOMAIN_CURRENT_SITE value.

Disable Plugins

Some WordPress Plugins may interfere with the login process. Disable all of your WordPress Plugins, either through the Administration Screen or by removing them from the /wp-content/plugins/ folder, so they will not be recognized by the program.

Alternatively, you can rename the plugins folder to something else temporarily to something like

/wp-content/pluginsXX/ and they will not be recognized. Rename the folder back to /wp-content/plugins/ once the base WordPress installation has been recovered.

Deactivate Theme

  • Rename the active theme folder (in wp-content/themes) by using FTP. Once renamed, WordPress will revert to using the {{DefaultTheme}}. When finally logged in, change to a different theme.
  • To find out what caused problem in the theme, upload and run this code when the theme is active:
    error_reporting (E_ALL); 

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


$user_login = $user_data["user_login"];


$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.
  • Enter your desired password.
  • From the Function drop-down list, choose MD5.
  • Save the info in the database.
  • Log in to WordPress using “admin” and the password you used.
  • In the case of newer versions of WordPress, the password is double hashed, but as long as you md5 the password, it will complete the hash (it upgrades your password for you).

Password Problems

For information on problems logging in due to a wrong or lost password, see Resetting Your Password. 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 siteurl 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']) );

Changed your WordPress address URI and cannot login nor access the database (but still can access the login page) ?

wp-login.php can be used to reset the address:

//FIXME: do comment/remove these hack lines. (once the database is updated)
update_option( 'siteurl', 'http://your.domain.name/the/path' );
update_option( 'home', 'http://your.domain.name/the/path' );

Subdomains or Subdirectories

In your wp-config.php try changing from:

define( 'SUBDOMAIN_INSTALL', true );


define( 'SUBDOMAIN_INSTALL', false );

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') . '/' ) );


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.

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

Another issue may be if you are redirecting using .htaccess from a non-www url prefix to a www while you have the wp-options table siteurl (WordPress address URL) and home (Blog Address URL) set with non-www prefix. Consequently this would create an endless loop which you need to avoid.

One way is to disable the .htaccess redirection temporarily by placing # before the line or eliminating the entries entirely and trying to Login again.

Advanced users may want to adjust the wp-options table siteurl (WordPress address URL) and home (Blog Address URL) through the database.

Notice that this issue can also occur if you are redirecting from www to non-www but have your wp-options table siteurl (WordPress address URL) and home (Blog Address URL) set with a www url prefix.

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.