Skip to content

IT Support Guides

  • Knowledge Base
  • Blog
  • Tools and resources
    • HTTP Status Code Checker
    • Password generator
    • What is my IP?
    • Who is – domain name info
  • About
  1. Home
  2. Knowledge Base
  3. Administration
  4. How to fix WordPress login redirect loop

How to fix WordPress login redirect loop

Monday, 24 February 2020 by Adrian Gordon
Last updated: Monday, 24 February 2020

Problem

When trying to log into a WordPress website, using the wp-login / wp-admin page – the page redirects back to the login page after entering in the username and password.

No error message is displayed – the username and password is correct.

Solution

Test 1 – can you login using another browser?

To help you understand the cause of the issue – open another browser (or a new ‘private’ window) and try to login.

If you can login – the issue is not with the website. Most likely a bad ‘cookie’ or browser addon.

If you can’t login – the issue is likely with the website. Most likely bad code in a plugin or the active theme.

Method 1 – Clear page cookies

Note: these instructions are for Firefox and will differ for other browsers.

  1. With the page open, press F12 on your keyboard
  2. The debug / developer tools will open at the bottom of the window
  3. Open the ‘Storage’ tab
  4. In the left hand, expand ‘Cookies’
  5. Right-click on the website’s name and click ‘Delete All’

Method 2 – Delete all browser cookies

Note: these instructions are for Firefox and will differ for other browsers.

  1. With the page open, press Ctrl + Shift + Delete on your keyboard
  2. For ‘Time range to clear’ select ‘Everything’
  3. Tick ‘Cookies’ and ‘Cache’ – you can leave other options un-ticked
  4. Click ‘Clear now’

Method 3 – Try temporarily disabling all plugins

  1. Access the website server using your preferred method – for example FTP or cPanel
  2. Browse to the /wp-content/ directory
  3. Rename the /wp-content/plugins/ directory – for example to plugins_backup
  4. Try to login again – if you can now login the issue is with one of your plugins
  5. Change the directory name back to plugins

How do I find out which plugin has the problem?

You will need to repeat the process for each of the plugins.

  1. Oopen the /wp-content/plugins/ directory
  2. For each of the plugins, temporary rename (e.g. add _backup)
  3. Try to login again – if you can now login the issue is with that plugin
  4. Change the directory name back if it is not causing the issue

Method 4 – Try temporarily disable your active theme

  1. Access the website server using your preferred method – for example FTP or cPanel
  2. Browse to the /wp-content/themes directory
  3. Rename the directory for your active theme – for example to my_awesome_theme_backup
  4. Try to login again – if you can now login the issue is with your active theme

Method 5 – Specify site URL

  1. Access the website server using your preferred method – for example FTP or cPanel
  2. Browse to the root directory for your WordPress installation
  3. Edit the wp-config.php file
  4. At the top of the file, just after <?php add the following lines
  5. Don’t forget to use the address for YOUR website
  6. define('WP_HOME','https://www.wpdevguides.com');
    
    define('WP_SITEURL','https://www.wpdevguides.com');

Method 6 – Rename .htaccess configuration file

Note: these instructions only apply to Apache hosted websites. NOT nginx.

  1. Access the website server using your preferred method – for example FTP or cPanel
  2. Browse to the root directory for your WordPress installation
  3. Rename the .htaccess file – for example to .htaccess_backup
  4. Try to login again – if you can now login the issue is in your .htaccess configuration
  5. Now you are logged in – you can generate a new .htaccess file by going to Settings > Permalinks and clicking ‘Save’
  6. If you are still not able to login – change the file name back to .htaccess

Related Articles

  • Classic Editor / TinyMCE – How to automatically insert Non-Breaking Space using Ctrl + Shift + Space
  • How to hide the admin toolbar
  • How to disable the admin bar for all users
  • How to create a WordPress plugin for your custom functions
  • How to install WordPress beta versions
  • How to change Local by Flywheel upload limit

Latest

  • Why are recipe websites so hard to use?
  • Google “Instant Answers” could end the Internet as we know it
  • Classic Editor / TinyMCE – How to automatically insert Non-Breaking Space using Ctrl + Shift + Space
  • Google Chrome – Downloads won’t start / being blocked
  • Excel wont allow insert new rows

Popular

WordPress Security htaccess T-SQL File Explorer jQuery Office 2016 Ubuntu 16.04 Silent install VLC Media Player Outlook 2016 Microsoft Office 2010 CMD SQL Management Studio wp-admin TSQL iPod iPhone iPad Search Ubuntu 18.04 Adobe Acrobat Windows 10 Outlook 2013 Windows 7 Word 2013 Crystal reports Google Chrome SQL Firefox Office 2013 PHP Windows 8 SQL Server Gravity Forms Excel 2016 Word 2016 SCCM ConfigMgr Excel 2013 Ubuntu Office 365 PDF Google

Recent Posts

  • Why are recipe websites so hard to use?
  • Google “Instant Answers” could end the Internet as we know it
  • Classic Editor / TinyMCE – How to automatically insert Non-Breaking Space using Ctrl + Shift + Space
  • Google Chrome – Downloads won’t start / being blocked
  • Excel wont allow insert new rows

Popular

WordPress Security htaccess T-SQL File Explorer jQuery Office 2016 Ubuntu 16.04 Silent install VLC Media Player Outlook 2016 Microsoft Office 2010 CMD SQL Management Studio wp-admin TSQL iPod iPhone iPad Search Ubuntu 18.04 Adobe Acrobat Windows 10 Outlook 2013 Windows 7 Word 2013 Crystal reports Google Chrome SQL Firefox Office 2013 PHP Windows 8 SQL Server Gravity Forms Excel 2016 Word 2016 SCCM ConfigMgr Excel 2013 Ubuntu Office 365 PDF Google
  • About
  • Donate
  • Privacy policy
  • Copyright
© Copyright IT Support Guides