Have you ever tried logging into your WordPress site only to find yourself stuck in an endless loop, being redirected back to the login page again and again? It’s a frustrating experience, especially when you need quick access to your dashboard.
This issue, known as the WordPress login page refresh loop, is a common problem that can arise for several reasons. Let’s get into the most common causes now and help you fix it.
Common Causes of the Login Page Refresh Loop
The WordPress login page refresh loop can be caused by several common issues. Here are the most frequent culprits:
- Browser Cache and Cookies Issues: If your browser’s cache or cookies become outdated or corrupted, they can cause login problems, including the refresh loop. This is often the first thing to check and clear when facing this issue.
- Incorrect WordPress URL Settings: If the “WordPress Address (URL)” or “Site Address (URL)” settings in your WordPress dashboard are incorrect, they can cause redirects. This often happens after migrating a site or changing domains.
- Plugin Conflicts: A faulty or poorly coded plugin can interfere with the login process. Sometimes, updates or compatibility issues between plugins can cause the refresh loop.
- Theme Conflicts: Themes, especially custom or outdated ones, can sometimes conflict with the WordPress login functionality. Switching to a default theme can help identify whether the theme is the issue.
- Corrupt .htaccess File: The .htaccess file in your WordPress directory manages many aspects of your site, including redirects. A corrupted or misconfigured .htaccess file can trigger the login refresh loop.
- Incorrect File Permissions: If WordPress files and folders do not have the correct file permissions, it may prevent proper access to the login page or dashboard.
Step-by-Step WordPress Login Loop Troubleshooting Guide
When you’re struck with a login loop, here are the steps you should follow to get down to the root cause.
1. Clear Your Browser Cache and Cookies
Cached files or outdated cookies in your browser may be causing the login loop.
A first step is to clear the cache and cookies in your browser settings.
- For Chrome: Go to Settings > Privacy and Security > Clear browsing data. Select “Cookies and other site data” and “Cached images and files,” then click “Clear data.”
- For Firefox: Go to Settings > Privacy & Security > Cookies and Site Data, then click “Clear Data.”
- For Safari: Go to Preferences > Privacy > Manage Website Data, and then click “Remove All”
- For Edge: Go to Settings > Privacy, Search & Services > Clear Browsing Data, then click “Clear Data.”
After clearing, close and reopen the browser, then try logging in again.
2. Disable Plugins via FTP or File Manager
A faulty plugin can conflict with the WordPress login process.
- Use FTP (via FileZilla or similar) or your hosting file manager to access your site’s files.
- Navigate to the wp-content folder.
- Rename the “plugins” folder to something like “plugins_old” to disable all plugins.
- Try logging in again. If successful, rename the folder back and reactivate plugins one by one to identify the culprit.
3. Switch to a Default WordPress Theme
When outdated or poorly coded, themes can cause conflicts. Here’s what to do:
- Via FTP, go to wp-content > themes.
- Rename the active theme folder to something else (e.g., “theme_old”). WordPress will automatically revert to a default theme (such as Twenty Twenty-One).
- Check if you can now log in. If so, the issue lies with your theme.
4. Check and Fix the .htaccess File
A corrupt or misconfigured .htaccess file can cause login issues. Try these steps:
- Access the root folder of your WordPress installation via FTP or your hosting file manager.
- Download a backup of your existing .htaccess file, then delete it from the server.
- Try logging in again. WordPress will automatically generate a new .htaccess file once you update your permalinks:
- Go to Settings > Permalinks in the WordPress dashboard, then click “Save Changes” without modifying anything to create a new .htaccess file.
Here is what a basic .htaccess file looks like:
5. Verify Your WordPress URL Settings
Incorrect “WordPress Address (URL)” or “Site Address (URL)” settings can lead to redirects and the refresh loop.
- Access your database via phpMyAdmin (usually available in your hosting control panel).
- In the database, find the wp_options table.
- Locate the siteurl and home rows. Ensure both URLs are correct (they should match your site’s domain).
- Update if necessary and save the changes.
6. Adjust File Permissions
Incorrect file permissions can prevent WordPress from functioning properly. Here’s what to do:
- Via FTP or File Manager, check the permissions for WordPress files and folders.
- Directories should have permissions set to 755, and files should be set to 644. 755 allows the owner to read, write, and execute, while others can only read and execute directories. 644 ensures the owner can read and write files, but others can only read, preventing unauthorized file modifications.
- Correct any permissions that are too restrictive or too open.
7. Disable Security Plugins Temporarily
Sometimes, security plugins can block login access by adding extra protection layers.
To fix this, disable any security plugins in the same way you disabled regular plugins (via FTP). If you can log in afterward, adjust the settings within the plugin once re-enabled.
8. Check for Server-Side Issues
Server configurations, such as caching or security settings, could also cause the issue.
Contact your hosting provider to check if any server settings or firewalls may be causing login difficulties.
9. Reinstall WordPress Core Files
Corrupted core files are another cause of WordPress login problems. Here are some steps you can take to check this:
- Download a fresh copy of WordPress from wordpress.org.
- Upload the files via FTP, except for the wp-content folder, and overwrite the existing files on your server.
- This process will refresh core WordPress files without affecting your site content.
NB! Back up the wp-config.php file before this process, as it contains crucial configuration information.
10. Check Your Php Version
A final recommendation is to check PHP version compatibility as outdated PHP versions can sometimes cause login issues.
Avoiding WordPress Login Issues in the Future
Once you’ve gotten to the bottom of your login loop, here are some things you can do to avoid this problem in the future.
- Keep WordPress, themes, and plugins updated.
- Clear your browser cache and cookies regularly – at least once every 2 months is recommended.
- Only download and install trusted and compatible plugins and themes.
- Create a backup of your WordPress site every other month.
- Install a security plugin such as Wordfence to protect your login page.
- Disable WordPress login hints and limit login attempts.
- Keep a close eye on your server performance so that you can optimise where necessary.
- Set up a recovery email or two-factor authentication as an extra layer of security.
- Always ensure that the “WordPress Address (URL)” and “Site Address (URL)” are correct, especially after site migration or domain changes.
- Regularly scan your site for malware.
In Closing
A WordPress login loop is frustrating and it can take some time to get to the bottom of the issue. However, once you do, you can take steps to avoid this common problem in the future.
If you don’t have the resources or expertise, contact WordPress Support Specialists. We will get your site up and running again in no time at all.