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.
- With the page open, press F12 on your keyboard
- The debug / developer tools will open at the bottom of the window
- Open the ‘Storage’ tab
- In the left hand, expand ‘Cookies’
- 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.
- With the page open, press Ctrl + Shift + Delete on your keyboard
- For ‘Time range to clear’ select ‘Everything’
- Tick ‘Cookies’ and ‘Cache’ – you can leave other options un-ticked
- Click ‘Clear now’
Method 3 – Try temporarily disabling all plugins
- Access the website server using your preferred method – for example FTP or cPanel
- Browse to the /wp-content/ directory
- Rename the /wp-content/plugins/ directory – for example to plugins_backup
- Try to login again – if you can now login the issue is with one of your plugins
- 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.
- Oopen the /wp-content/plugins/ directory
- For each of the plugins, temporary rename (e.g. add _backup)
- Try to login again – if you can now login the issue is with that plugin
- Change the directory name back if it is not causing the issue
Method 4 – Try temporarily disable your active theme
- Access the website server using your preferred method – for example FTP or cPanel
- Browse to the /wp-content/themes directory
- Rename the directory for your active theme – for example to my_awesome_theme_backup
- Try to login again – if you can now login the issue is with your active theme
Method 5 – Specify site URL
- Access the website server using your preferred method – for example FTP or cPanel
- Browse to the root directory for your WordPress installation
- Edit the wp-config.php file
- At the top of the file, just after <?php add the following lines
- Don’t forget to use the address for YOUR website
-
define('WP_HOME','https://www.itsupportguides.com'); define('WP_SITEURL','https://www.itsupportguides.com');
Method 6 – Rename .htaccess configuration file
Note: these instructions only apply to Apache hosted websites. NOT nginx.
- Access the website server using your preferred method – for example FTP or cPanel
- Browse to the root directory for your WordPress installation
- Rename the .htaccess file – for example to .htaccess_backup
- Try to login again – if you can now login the issue is in your .htaccess configuration
- Now you are logged in – you can generate a new .htaccess file by going to Settings > Permalinks and clicking ‘Save’
- If you are still not able to login – change the file name back to .htaccess