How do I fix WordPress when I can't login?

This page is showing a generic answer.
To see a more detailed answer customized for you, type your domain name here:

Occasionally people will misconfigure their WordPress website so that they can no longer login to its administrative “dashboard” pages. For example, this can happen if you move the WordPress files to a different folder without first updating its “WordPress Address (URL)” and “Site Address (URL)”.

Before making any changes, you should make an extra backup of your website.

On this page:

Fixing your site if you can’t login after moving it to a new location

If you’ve moved WordPress from one location to another and you find that you can’t login to the WordPress dashboard, you can fix it by following these steps:

  1. Login to your WordPress database using phpMyAdmin.
  2. Click wp_options in the list of table names in the left-hand column (or the appropriate _options table with whatever custom prefix your site is using). If you don't see a list of table names, click the + sign to the left of your database name (in the left column).
  3. Click the SQL tab along the top of the page.
  4. The main part of the window will show a default “SELECT” query. Erase that entire query. Enter this new query, making sure to change the wp_options table name or the address specified in the “option_value” as appropriate:
    UPDATE wp_options SET option_value = 'http://example.com' WHERE (option_name = 'siteurl') OR (option_name = 'home');
  5. Click Go. You should see the result that 2 rows were affected.
  6. Now clear your browser cache and try to login to WordPress again.
  7. Click Settings, Permalinks.
  8. Click Save Changes. (This step is necessary to update the .htaccess file with the correct RewriteBase rule.)

Your WordPress site should work after you’ve made these changes.

Additional fixes

If your WordPress site is still having problems and you can login, then try these other things:

  1. If your site is using WP Super Cache (as we recommend), click WP Super Cache (in the Settings section), click the Advanced tab, then scroll down a bit and click on the Update Mod_Rewrite Rules button.
  2. Clear your Web browser’s cache.
  3. Try logging out of WordPress (because some things work differently when you are logged in).

You can contact us if you still have problems after trying all of these items.