Refreshing & Redirecting Issue - feature image

Theme Issues

WordPress themes are another common cause of login errors. To find out whether the problem is being caused by your theme, you need to deactive your theme. The process is similar to deactivating the plugin.

To do this, connect to your website using an FTP client.

Next, go to /wp-content/themes/ directory and rename your current theme directory to anything.  WordPress will look for your current theme and will fall back to the default theme.

Finally, try logging in again. If you succeed, then this means your theme was causing the issue. You may contact the theme provider or choose to use another theme.

If you are already using the default theme as your current theme, then you can still rename it and try to login. If you are able to successfully login then this means that your default theme may have been coorupted. Download a fresh copy of the default theme from WordPress theme respository and upload it to your website.

Corrupted Login File

If the WordPress login file: “wp-login.php”, is corrupted, deleted, or misplaced, you won’t be able to access the login screen at all.

Solution:

To check if this is the problem ( and to simultaneously resolve it) you will need to replace the file with a new one.

  • Backup WordPress before deleting your login file.
  • Locate your “wp-login.php” file with an FTP client and delete it. You’ll find it in the directory where you’ve installed WordPress.
  • Next, download the latest version of WordPress and locate the “wp-login.php” file in the new download
  • Copy this file in place of your deleted file.

If the login file was the issue, you should now be good to go.

Url show 404 not found, or url redirects, or page refreshes.

In some cases, you may type in your WordPress login url correctly but be taken to a “404 not found” error page, or redirected to another page. Or you may get to the correct page but it simply refreshes when you try to login.

refresh-reirecting-issue-404not-found

SOLUTION:

You can usually fix this problem by “creating a new .htaccess File” or “updating your site url.”

Create a new .htaccess File

Sometimes .htaccess file can get corrupted which can result in internal server errors or login page refreshing error. Simply access your website through FTP.

First, you want to confirm if .htaccess is the source of your problem, and you can do this by renaming this file to disable it, and trying to login after that.

Search for the .htaccess file. Right click on it, select “Rename” and change the name.

refresh-redirecting-.htaccess.png

Now go to your login url and try to login your WordPress admin dashboard.

If you succeed, then this means that your .htaccess file were stopping you from logging into WordPress. Once you are logged in, simply go to Setting > Permalinks and click Save. This will generatea new .htaccess file.

Update your site url

If the step above doesn’t fix your login issue, then you may need to manually set your site url.

There are several ways to set your site url but the easiest is to edit your wp_config file. Simply add these two lines of code in your wp-config.php file and don’t forget to replace the example.com with your own URL.

 refreshing-redirecting-siteurl

We hope that the solutions included in this tutorial series can help you resolve the WordPress login. Let’s quickly recap the solutions to run through if you’re having issues :

  • Retrieve lost password or Using the built-in recovery feature.
  • Reset password by editing your database using PhpMyAdmin.
  • Reset password by editing functions.php file.
  • Clear your browser cache and cookies.
  • Deactivate All Plugins.
  • Revert back to the default theme.
  • Replace your login file.
  • Create a new .htaccess File.
  • Update your site url.

 

How many of these issues have you come across while working on your WordPress sites? Please Let us know which method worked for you by leaving a comment below. Or if the method you used is not mentioned in this article. We will update the article to make this guide more perfect.