I recently encountered a problem whereby I became locked out of my own blog, where attempting to access the admin page for WordPress would redirect me to the page I came from. Apparently this is quite a common (and infuriating) problem with WordPress blogs. Considering this, I thought I would be able to find a solution a lot quicker than I did.
Most of the advice online falls into one of 2 categories:
- Login using [blogroot]/wp-login.php instead. This is the easiest method to try, as it doesn’t involve changing anything. Once you’re logged in, you should be able to access your wp-admin dashboard without any problems. If this doesn’t work, then the next most popular piece of advice seems to be:
- Backup and then delete the .htaccess file from your blog root. .htaccess files are the usual method for managing redirects within WordPress, so this advice makes sense.
It seems that a combination of these methods seems to resolve most peoples’ problems. However, neither worked for me.
It turned out that the problems that I was having were related to a faulty plugin. Without access to the dashboard I was unable to disable my plugins, so I had to disable them via FTP instead. If neither of the above methods work for you, try this:
- Login to your website via ftp, and navigate to /wp-content/.
- Rename the /plugins/ folder to /plugins-backup/ or similar. WordPress will be unable to detect them, and will deactivate them.
- Attempt to login to WordPress using your usual method. If your problems were due to a faulty plugin, you should now be able to log in.
- Rename your /plugins-backup/ folder back to /plugins/. Your plugins will remain deactivated on WordPress as a precaution.
- You can now reactivate your plugins on WordPress one by one to find out which was the culprit.