How to fix Wpadmin refreshes or redirects to 404 error
In this post we’re going to see how to fix wp-admin page refreshing or redirecting to 404 error. This is a common error and there are couple of fixes you can use for this error.
What Causes Login Page Refresh and Redirect Issue in WordPress?
First, let’s study the underlying causes behind login refresh and wordpress url problems that cause these issues.
Once we understand the issues it’s easier to fix the problem.
When you login WordPress checks the username and password and sets a login cookie after which you are given access to the admin area.
Should WordPress fail to set the login cookie correctly, you will find that the login page will refresh. If the admin area URL is incorrect you’re going to get back to the login page instead of the dashboard. So these are the core issues at heart.
Here’s how to troubleshoot and fix the issue
Clear Cookies to resolve wp-admin login error
This launches the settings page and shows the clear browsing data popup on the screen.
You need to select clear cookies and other site data and cached images and files.
Click on clear data button and Google chrome clears away the browser cache.
Your browser should have cookies enabled. Then restart the browser and login. This solves the issue in most cases.
Update WordPress URL Settings
WordPress has settings options in the URL of the site and URL of WordPress installation.
When you have access to WordPress admin find this under settings followed by Genral page.
If and when these urls are not correct WordPress redirects you back to the login apge once again.
Since you’re not able to access the wp-admin area, you need to find a way to edit the wp-config file to fix the issue.
The wp-config file is the centre for your WordPress sites settings. Access this using ftp client or through the file manager that most WordPress hosts provide.
The wp-config file is in the site’s root folder. Edit the file and paste the code.
Be sure to replace example.com with your site.
Save changes and upload back the file to your site. Visit the site and login and that might fix the issue for you.
Delete .htaccess File in WordPress
The .htaccess file on your site can get corrupted and can cause issues from login page or the refresh error.
Access your site through FTP client or through the file manager app on the hosting account.
Once you do locate the .htaccess file in the root folder of the site and download it to your computer.
Then delete the .htaccess file from the site. Open the wp-admin director and see if there’s a .htaccess file in there. Delete that too.
Login to your WordPress site. If you’re successful, the .htaccess was corrupted adn was stopping you from accessing the site. Once you’re logged in go to settings permalinks and click on save button without making any changes. This creates a new .htaccess file for you.
Deactivate All WordPress Plugins
WordPress plugin files or theme files can cause conflict and result in blocking access to the site. To deactivate WordPress plugins connect your site with FTP client.
Go to /wp-content directory. Inside, you see a folder called plugins. This is where wordpress stores all your plugin files.
Rename the plugins folder to plugins_backup.
This deactivate all wordpress plugins installed on the site.
WordPress can cause issues with the theme or the new version of the theme and the WordPress installation. To deactivate the theme files, you need to deactivate the theme.
Go to ftp client. Access /wpcontent/themes/directory and rename the current directory to themes_backup.
Once done, try logging in once again. If you see success the theme files were causing the issue.