wp-admin redirects to 404
Question
Yesterday I logged onto my site and found that when I log in as an admin I get a 404 error as seen below:
I have done a bit of research and uploaded a backup, modified my .htaccess
file to below:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
but to no avail.
Trying to access anything that is /wp-admin/
results in a 404 inclusive of the wp-stats
image as seen in the picture.
I have downloaded a new version of Wordpress and uploaded it's wp-admin
folder.
Aside from the above error, the site works fine.
EDIT
SHH Error log:
[Fri Apr 13 10:21:47 2012] [error] [client {redacted}] Premature end of script headers: index.php, referer: http://dailywealthreport.com.au/wp-login.php
[Fri Apr 13 10:21:50 2012] [error] [client {redacted}] Premature end of script headers: admin.php, referer: http://dailywealthreport.com.au/wp-admin/
Solution
One possible reason is that the /wp-admin has been reset to something else, for security reasons. The WP Better Security plugin can do this. I know, because I have in the past turned on a bunch of this plugin's options, without thinking too much about it, including the one that re-writes the /wp-admin URL so you need to go to /admin. -- And then I forgot about it too, which was frustrating!
Try moving all the plugins out of wp-content/plugins (to turn them off temporarily), then see if it works normally. Then, you can selectively re-turn-on the plugins and see what's going on.
OTHER TIPS
Finding The Cause Of The WP-admin Redirection & Refresh Error
- List item
- Plugin Conflict
- Theme Conflict
- Reach Out To Your Web Hosting Support
- .htaccess File Corruption
- Site URL Error
- Cookies And Cache
I was getting the same thing, tried everything from reinstalling WP, resetting my .htaccess and doing things that only made things worse. Turns out it I should have done was clear out my own Cookies And Cache. Problem fixed.