WordPress wp admin redirect loop – Causes and Fix
My WordPress wp admin page always redirects to login screen. I use the correct credentials. Please help me!!
That was a recent support request that we received at our Outsourced Tech Support Services, where we resolve support queries for web hosting providers.
The WordPress admin panel shows the login page again and again even though he used the correct logins every time.
What’s going wrong?
Today, let’s take a quick look at the common causes for WordPress wp admin redirect problems and how we fix them.
Causes and Fixes for Wordpress wp admin redirect problem
In our experience handling WordPress wp admin redirect problems, we’ll see the major causes for this error.
It’s always advisable to take a backup of your website files and database before you try any of these steps.
1. Cookies and Cache problems
WordPress uses session cookies to store authentication details and is used when a user logs into the WordPress admin area.
These cookies expire every 15 days.
You update your wp-admin password, but your browser cookies store older information.
Similarly, your browser cache may use older versions of some of the WordPress files.
All these can lead to WordPress wp admin redirect problem.
To verify this, clear your browser cache and cookies, restart the browser and try to login again.
Always, make sure to enable cookies in your browser as disabling this feature will affect your WordPress login.
You can also use alternate browsers to access wp-admin page and check the results.
2. Plugin conflict
Sometimes, WordPress plugins can be the culprit.
We’ve seen cases where conflict between plugins, a poorly coded plugin or an incomplete plugin update causes wp-admin redirect problem.
To confirm that plugins create problems, we’ll deactivate all the plugins associated with the WordPress site.
Our Hosting engineers connect to the hosting account via FTP and rename “plugins” folder to something else. This will deactivate all the plugins.
If this is successful, we’ll reactivate each plugin one by one and isolate the faulty plugin.
3. Theme conflict
Like plugins, WordPress themes can also create wp admin redirect problems.
You may face this login issue after new theme installs, theme updates, WordPress updates, etc.
To identify that theme creates the problem, we’ll switch to a default theme.
Our Hosting Engineers connect to the website’s database and update the theme to default one like TwentySixteen.
This can be done quickly by editing the fields “Template” and “Stylesheet” in “wp-options” table.
If the WordPress wp-admin login works fine, we confirm that the issue is with the theme.
We’ll then remove the faulty theme and upload a fresh copy of it. If it’s not fixed, then only the theme developer can help here.
4. Corrupted .htaccess file
The .htaccess file in WordPress contains the rewrite rules for the WordPress site and associated links to work fine.
But, it can happen that this .htaccess file is corrupted or accidentally modified by a plugin.
As a result, these rules no longer work fine and can result in WordPress wp admin redirect loop error.
To fix this problem, our Hosting Engineers connect to the website via FTP and backup the .htaccess file by renaming it to something else(eg: .htaccess_bak).
Sometimes, an .htaccess file can be found in the “wp-admin” directory. You need to rename this file as well.
If this works fine, we’ll login to wp-admin panel and regenerate .htaccess file using the below steps.
- Go to Settings > Permalinks
- Click Save.
5. Incorrect SiteURLcome
In WordPress, the parameter “SiteURL” is where you specify the address people have to type in their browser to access the blog.
SiteURL controls the display of the URL in the admin section of your page, main page and are used throughout the WordPress site.
A mis-configured SiteURL can also cause WordPress wp admin redirect problem.
We’ll connect to the website’s database and add the full website name(including http or https) in the fields “siteurl” and “home” in “wp-options” table.
Alternatively, we’ll add the following code in the wp-config.php file. Replace “www.yourdomain.com” with the exact domain name.
You’re done!! Go back to your WordPress admin page and check again.
One time or another, WordPress website owners will come across “WordPress wp admin redirect problem“. Today, we’ve seen the top 5 reasons of this error and how our Dedicated Support Engineers fix them.