What Causes Login Page Refresh and Redirect Issue in WordPress?Incorrect WordPress URL settings and failure to set login cookies are the most common reasons causing the login page redirect and refresh issue. Normally, when you login, WordPress validates your username and password and then sets a login cookie in your browser. After that, it redirects you to the WordPress admin area. If WordPress fails to set the login cookie correctly, or your WordPress admin area URL is incorrect, then you’ll be redirected back to the login page instead of the admin dashboard. Troubleshooting Steps:
- Clear cookies from your browser. Then restart your browser and try to log back in. In case you are successful then that means your saved cookies were causing the problem.
- If the step 1 is not successful. Try using step 2. In this step you are required to correct the URL settings of your WordPress website.WordPress comes with a settings option that has the URL of your website and the URL of your WordPress installation. If you had access to your WordPress admin area, then you could see this option under Settings » General page. If these URLs are incorrect, then WordPress will redirect you back to the login page. Now, since you are unable to access the WordPress admin area, you’ll need to edit the wp-config.php file to fix this issue.The wp-config.php file is a special file in WordPress which contains your important WordPress settings. You can access using an FTP client or via File Manager app in your WordPress hosting account dashboard.You’ll find the wp-config.php file in your site’s root folder. Simply edit the file and paste the following code just before the line that says ‘That’s all, stop editing! happy publishing’.
- .htacess file in your WordPress Database is corrupt. Sometimes .htaccess file can get corrupted which can result in internal server errors or login page refreshing error. Simply access your website through an FTP client or via the File Manager app in your hosting account dashboard. Once connected, locate the .htaccess file in the root folder of your website and download it to your computer as a backup. After that, go ahead and delete the .htaccess file from your website. Next, open the wp-admin directory and if there is a .htaccess file there, then go ahead and delete it as well. You can now try to log in to your WordPress website. If you succeed, then this means that your .htaccess file was stopping you from logging into WordPress. Once you are logged in, simply go to the Settings » Permalinks page in the WordPress admin area and click on the Save button without making any changes. This will generate a new .htaccess file for your website. If this step does not work then move on to step 4.
- Deactivation of all the Plugins. Sometimes WordPress plugins can cause this issue especially if there is a conflict between two plugins. To deactivate all your WordPress plugins, connect to your website using an FTP client or via the File Manager app in your hosting account dashboard. Once connected, go to the /wp-content/ directory. Inside it, you’ll see a folder named ‘plugins’. This is where WordPress installs all your plugins. Simply rename the plugins folder to plugins_backup. This will deactivate all WordPress plugins installed on your website. Once you have deactivated all plugins, try to log in to your WordPress site. If you succeed, then this means that one of your plugins was causing the issue. In case this does not work go to step 5.
- Go back to the default theme.WordPress themes can also cause conflicts after upgrading to a newer version of WordPress or the theme itself. To find out whether the problem is being caused by your theme, you need to deactivate your theme. The process is similar to deactivating the plugins. Connect to your website using an FTP client. Go to /wp-content/themes/ directory and rename your current theme directory to themes_backup. Once you have done that, then try logging in again. If you succeed, then this means your theme was causing the issue. You can now reinstall a fresh copy of your theme to see if this resolves the issue. If the issue reappears, then contact your theme’s support or switch to a different WordPress theme.We hope this article helped you resolve the WordPress Login Refresh/Redirect Issue. if you like our blog post “WordPress Login Refresh/Redirect Issue” give it a thumbs up and if you did not then comment down your views in the comments section below.Alternatively, you can watch the following video of WPbeginner