A redirect loop on your WordPress admin page usually occurs because the site URL settings do not match the actual protocol (HTTP vs. HTTPS) or because a plugin is forcing a secure connection that the server cannot handle correctly. To fix this, you must temporarily disable plugins via FTP or file manager, correct the site URLs in the database or wp-config.php, and ensure your hosting provider has valid SSL certificates installed.
What You'll Need
- FTP client (e.g., FileZilla) or access to your hosting control panel's File Manager
- Database management tool (e.g., phpMyAdmin)
- Text editor for modifying configuration files
- Backup of your website files and database
Step-by-Step
- Access your site files: Connect to your web server using an FTP client or log in to your hosting control panel and open the File Manager. Navigate to the root directory of your WordPress installation.
- Disable all plugins: Locate the
wp-contentfolder. Rename thepluginsfolder to something likeplugins_old. This forces WordPress to ignore all active plugins, which are often the cause of conflicting redirect rules. Try accessing your admin page again. If it loads, a plugin was the culprit. - Check wp-config.php: In the root directory, find the
wp-config.phpfile. Open it with a text editor. Look for lines definingWP_HOMEandWP_SITEURL. Ensure they match exactly what you want (e.g., both starting withhttps://). If these constants are present, they override database settings. Remove them if you want to manage URLs via the database instead. - Update database URLs: Log in to your hosting control panel and open phpMyAdmin. Select your WordPress database. Find the
wp_optionstable (the prefix may differ). Locate the rows namedsiteurlandhome. Click Edit on each row and change the value fromhttp://tohttps://if your site uses SSL. Save the changes. - Clear browser cache: Redirect loops are often cached by your browser. Clear your browser's cache and cookies specifically for your domain, or try opening the admin page in an incognito/private window to verify the fix.
- Re-enable plugins: If the site now works, rename the
plugins_oldfolder back toplugins. Go to the Plugins menu in your admin dashboard and activate plugins one by one, checking the site after each activation. When the loop returns, the last activated plugin is the issue. Delete or update that specific plugin. - Verify SSL certificate: Ensure your hosting provider has issued and installed a valid SSL certificate for your domain. An expired or mismatched certificate can sometimes trigger redirect issues if the server tries to force HTTPS but fails validation.
Common Mistakes
One frequent error is changing only the siteurl or only the home option in the database; both must be consistent. Another mistake is forgetting to clear the browser cache, leading users to believe the fix failed when the old redirect rule is still stored locally. Additionally, manually editing the .htaccess file without understanding Apache rewrite rules can create new loops, so avoid touching this file unless necessary.
Tips
- Always take a full backup before editing database entries or core configuration files.
- If you use a Content Delivery Network (CDN) like Cloudflare, check its settings. A "Flexible" SSL setting combined with a forced HTTPS redirect on the origin server can cause loops. Use "Full" or "Full (Strict)" SSL modes if your origin supports HTTPS.
- Use a staging environment to test fixes if possible, preventing downtime on your live site.
Troubleshooting
If the steps above do not resolve the issue, check your .htaccess file in the root directory. Rename it to .htaccess_old to see if custom rewrite rules are causing the conflict. If the site loads, regenerate the permalinks in Settings > Permalinks to recreate a clean .htaccess file. If problems persist, contact your hosting support to verify that the SSL certificate is correctly configured at the server level and that there are no server-side redirects interfering.
Frequently Asked Questions
Why does my WordPress admin page keep refreshing?
This behavior indicates a redirect loop where the server sends the browser to a URL that immediately redirects back to the previous one, creating an infinite cycle.
Can I fix this without FTP access?
Yes, most hosting providers offer a File Manager in their control panel that allows you to rename folders and edit files directly in the browser.
Do I need to change the database if I use wp-config.php?
No, if you define WP_HOME and WP_SITEURL in wp-config.php, those values override the database settings, so updating the database is unnecessary.
Will clearing cookies break my login session?
Yes, clearing cookies will log you out of any active sessions, requiring you to sign in again, but it resolves caching-related redirect errors.