Errors / Wednesday August 26, 2026
Fixing WordPress Redirect Loops: Step-by-Step Solutions

WordPress redirect loops are one of the most common causes of the ERR_TOO_MANY_REDIRECTS error. These loops typically occur when WordPress URL settings conflict with server configurations, plugins enforce contradictory redirects, or cached data perpetuates old redirect instructions. The frustrating part is that redirect loops often lock you out of your WordPress admin, making fixes seem impossible.
This guide provides step-by-step solutions to fix WordPress redirect loops, whether you can access your admin dashboard or not. From correcting URL settings to identifying plugin conflicts and clearing WordPress cache, you’ll find practical fixes that get your site accessible again.
Fix WordPress URL Setting Mismatches
The WordPress Address (URL) and Site Address (URL) settings are the most common source of WordPress redirect loops. These settings control where WordPress expects to find its core files and where users access your site.
Accessing URL Settings via WordPress Admin
If you can still access your WordPress admin (perhaps the loop only affects your frontend), go to Settings > General and check both URL fields.
Both URLs should match exactly, including the protocol (HTTP vs HTTPS) and domain format (www vs non-www). Common mismatches that cause loops:
- WordPress Address: https://example.com and Site Address: http://example.com
- WordPress Address: https://www.example.com and Site Address: https://example.com
- WordPress Address: https://example.com and Site Address: https://oldsite.com (after migration)
Correct both URLs to match your intended site configuration. If you want your site to use HTTPS and www, both should be https://www.example.com. If you prefer HTTPS without www, both should be https://example.com.
Save the changes and test your site. The redirect loop should resolve if the URL mismatch was the cause.
Pro Tip: Before changing these settings, make note of the current values. If the change makes things worse, you’ll know exactly what to revert to. Backing up before making URL changes is always wise.
Fixing URL Settings via wp-config.php
If the redirect loop prevents you from accessing WordPress admin, you can force correct URL settings through wp-config.php.
Access your site files via FTP, SFTP using FileZilla, or your hosting control panel’s file manager. Navigate to your WordPress root directory (where wp-config.php is located) and download wp-config.php as a backup before editing.
Open wp-config.php and add these lines just above the line that says /* That’s all, stop editing! Happy publishing. */:
define(‘WP_HOME’,’https://yoursite.com’);
define(‘WP_SITEURL’,’https://yoursite.com’);
Replace https://yoursite.com with your actual site URL using the correct protocol and domain format you want. Both should match exactly.
Save the file and upload it back to your server, overwriting the original. Test your site – the redirect loop should be broken.
Once you can access WordPress admin again, you can remove these lines from wp-config.php. The values are now set in your database, and the wp-config.php definitions are no longer needed (though leaving them doesn’t hurt).
Updating URL Settings via Database
If wp-config.php changes don’t resolve the issue, or you prefer direct database editing, you can update URL settings through phpMyAdmin or another database management tool.
Access phpMyAdmin through your hosting control panel (cPanel, Plesk, or custom panel). Select your WordPress database from the left sidebar.
Find and click on the wp_options table (the prefix might be different if you changed it during installation – look for yourprefix_options).
Click “Search” at the top, then search for option_name = siteurl. Click “Edit” on the row that appears and change the option_value field to your correct site URL (e.g., https://yoursite.com).
Repeat the search for option_name = home and update its option_value to exactly match the siteurl.
Click “Go” or “Save” after each change. Test your site – the redirect loop should be resolved if URL settings were the cause.
Pro Tip: Always back up your database before making direct edits. One typo in the database can completely break your site. Most hosting control panels offer easy database backup options through phpMyAdmin.
Identify and Resolve Plugin Conflicts
WordPress plugins frequently cause redirect loops, especially security, SSL, caching, and redirect management plugins.
Disabling All Plugins via WordPress Admin
If you can access WordPress admin, go to Plugins > Installed Plugins, check the box at the top of the plugin list to select all plugins, choose “Deactivate” from the bulk actions dropdown, and click “Apply.”
Test your site. If the redirect loop is gone, a plugin was the cause. Now reactivate plugins one at a time, testing your site after each activation. When the redirect loop returns, you’ve identified the problematic plugin.
Once identified, either keep that plugin deactivated, reconfigure its settings if redirect-related options exist, or find an alternative plugin that doesn’t conflict with your setup.
Disabling Plugins via FTP/File Manager
If you can’t access the WordPress admin due to a redirect loop, disable plugins by editing your file system.
Access your site via FTP, SFTP, or hosting file manager. Navigate to /wp-content/ and find the plugins folder.
Rename the plugins folder to something like plugins-disabled or plugins-old. This instantly deactivates all plugins without deleting them. Test your site. If the redirect loop is resolved, a plugin was causing it. Rename the folder back to plugins to restore access to all plugins (they’ll still be deactivated).
To identify the specific problematic plugin, navigate into the /wp-content/plugins/ folder. You’ll see individual folders for each plugin. Rename one plugin folder at a time (e.g., rename really-simple-ssl to really-simple-ssl-disabled), then test your site.
When the redirect loop returns after renaming a specific plugin folder, you’ve found the culprit. Rename that plugin folder back to its original name to reactivate it, then reconfigure or replace it.
Common Plugin Culprits
Certain plugin types frequently cause redirect loops:
- SSL/HTTPS plugins like Really Simple SSL or Easy HTTPS Redirection can create loops if they force HTTPS while your server or CDN also forces HTTPS with conflicting logic. If you’ve already configured HTTPS at the server or CDN level, you don’t need these plugins.
- Security plugins like Wordfence, iThemes Security, or All In One WP Security sometimes implement their own redirect rules that conflict with server configuration or other plugins.
- Caching plugins can cache redirect headers, perpetuating loops even after fixing configurations. Plugins like WP Super Cache, W3 Total Cache, and WP Rocket have redirect-related features that might conflict.
- Redirect management plugins like Redirection or Simple 301 Redirects can create loops if you accidentally configure circular redirects or if their rules conflict with server-level redirects.
Fix Theme-Related Redirect Issues
WordPress themes occasionally cause redirect loops, particularly premium themes with built-in redirect functionality or SSL enforcement.
Switching to a Default Theme
The quickest way to test if your theme causes the redirect loop is to switch to a default WordPress theme.
If you can access WordPress admin, go to Appearance > Themes and activate a default theme like Twenty Twenty-Four, Twenty Twenty-Three, or whatever default theme is available.
Test your site. If the redirect loop disappears, your theme was the cause. You can either keep using the default theme temporarily, contact your theme developer for support, or check theme settings for redirect-related options that might conflict with your configuration.
Switching Themes via Database
If you can’t access the WordPress admin, change your active theme through the database.
Access phpMyAdmin and select your WordPress database. Find the wp_options table and search for option_name = template. Edit this row and change option_value to a default theme name like twentytwentyfour.
Search for option_name = stylesheet and change its option_value to the same theme name (twentytwentyfour).
Test your site. If the redirect loop is gone, your previous theme was causing it.
Clear WordPress Cache
Cached redirects can perpetuate redirect loops even after you’ve fixed the underlying configuration. WordPress cache exists at multiple levels that all need clearing.
Clearing Plugin Cache
If using a caching plugin (WP Super Cache, W3 Total Cache, WP Rocket, etc.), access WordPress admin if possible and find the plugin’s cache-clearing option. Most caching plugins have a Clear Cache or Purge Cache button in the admin bar or plugin settings.
If you can’t access admin, you can manually delete cache files via FTP/file manager. Cache plugins typically store cache in /wp-content/cache/ or within their own plugin folders. Delete the contents of these cache directories (not the directories themselves).
Clearing Object Cache
If your site uses Redis, Memcached, or WordPress object caching, this cache needs to be cleared separately.
For Redis or Memcached, access your server via SSH and restart the service:
sudo service redis restart
or
sudo service memcached restart
Alternatively, many hosting control panels offer cache flushing options for Redis and Memcached.
For WordPress object cache stored in files, delete the contents of /wp-content/cache/ if it exists.
Clearing PHP OPcache
PHP OPcache caches compiled PHP scripts and can sometimes perpetuate redirect issues.
The easiest way to clear PHP OPcache is to restart PHP-FPM through your hosting control panel or via SSH:
sudo service php-fpm restart
Many hosting control panels include OPcache clearing options in their cache management sections.
Pro Tip: After clearing all WordPress cache levels, also clear your browser cache and test in incognito/private mode. This ensures you’re seeing the actual current site behavior, not cached versions.
Check .htaccess for WordPress-Specific Issues
WordPress writes redirect rules to .htaccess files on Apache servers. Corrupted or conflicting .htaccess rules cause redirect loops.
Testing Without .htaccess
Access your site via FTP/file manager and navigate to your WordPress root directory. Find the .htaccess file (it might be hidden; enable viewing hidden files in your FTP client).
Rename .htaccess to .htaccess-backup or .htaccess-old. This disables all .htaccess rules without deleting the file.
Test your site. If the redirect loop is gone, something in .htaccess was causing it. If the loop persists, .htaccess wasn’t the problem – rename it back to .htaccess.
Regenerating WordPress .htaccess
If .htaccess was causing the loop, you can let WordPress regenerate a clean version.
With .htaccess still renamed (disabled), access WordPress admin and go to Settings > Permalinks. Don’t change anything, just click “Save Changes” at the bottom.
WordPress will generate a new .htaccess file with clean default redirect rules. Test your site; it should work now.
If you had custom rules in your old .htaccess, carefully add them back one at a time and test after each addition. When the loop returns, you’ve identified the problematic rule.
WordPress-Specific Best Practices
Once you’ve resolved the current redirect loop, prevent future occurrences with these practices.
Always ensure WordPress URL settings match your intended site configuration. Before changing URLs, understand the difference: WordPress Address is where WordPress files are located, while Site Address is where users access your site. For most installations, these should be identical.
Avoid running multiple plugins that perform the same function. Don’t use multiple SSL enforcement, caching, or redirect management plugins simultaneously. Redundancy increases conflict risk.
Configure HTTPS enforcement at only one level. If your hosting provider or CDN handles HTTPS redirects, don’t also enable HTTPS forcing in WordPress plugins. Choose one method and stick with it.
For reliable WordPress hosting performance with properly configured server settings that minimize redirect-loop risks, quality-managed WordPress hosting ensures that server-level configurations align with WordPress best practices from the start.
Fix WordPress Redirect Loops and Get Your Site Back Online
WordPress redirect loops can be fixed once you identify the source. Start with the most common cause (WordPress URL settings): check Settings > General if accessible, or edit wp-config.php or the database if locked out. Ensure both URLs match exactly in protocol and domain format.
If URL settings aren’t the issue, systematically disable plugins via admin or by renaming the plugins folder through FTP. Test after each plugin to identify conflicts. Theme issues are less common but easily tested by switching to a default WordPress theme.
Always clear all cache levels after making fixes: browser cache, WordPress plugin cache, object cache, and OPcache. Cached redirects persist even after fixing configurations. With methodical troubleshooting and proper configuration, you can resolve WordPress redirect loops and prevent them from recurring.
FAQs
Use FTP, SFTP, or your hosting control panel’s file manager. Connect to your server and navigate to your WordPress root directory (usually public_html or www). The wp-config.php file will be there. Download it, edit it locally, then re-upload.
No, deactivating plugins preserves all settings and data. Only uninstalling/deleting plugins removes data. Renaming the plugins folder to disable them also keeps everything intact – renaming it back restores the plugins with all settings preserved.
Yes, but only in specific scenarios like running WordPress from a subdirectory while displaying it at the root domain. For most standard installations, these should be identical. Mismatched URLs without proper configuration cause redirect loops.
If you’ve tried all WordPress-specific fixes without success, the issue likely stems from server configuration, CDN settings, or SSL problems rather than WordPress itself. Check server redirect rules in .htaccess or nginx config, verify CDN settings if using one, and ensure SSL is properly configured.