How do I fix WordPress when I can't login?
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:
- Login to your WordPress database using phpMyAdmin.
- 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).
- Click the SQL tab along the top of the page.
- 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');
- Click Go. You should see the result that 2 rows were affected.
- Now clear your browser cache and try to login to WordPress again.
- Click Settings, Permalinks.
- 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.
If your WordPress site is still having problems and you can login, then try these other things:
- 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.
- Clear your Web browser’s cache.
- 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.