最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

wp admin - I'm getting a 404 message when I try to access wpadmin

programmeradmin2浏览0评论

I can't access wp-admin at all after changing wp-config folder permission for hardening my security. The content for the site load find, I cant access wp-admin at all, all I get is 404 message.

I can't access wp-admin at all after changing wp-config folder permission for hardening my security. The content for the site load find, I cant access wp-admin at all, all I get is 404 message.

Share Improve this question edited May 4, 2018 at 10:15 Ooker 3323 silver badges23 bronze badges asked May 18, 2012 at 14:13 John DoeJohn Doe 1571 gold badge1 silver badge10 bronze badges 4
  • have you tried reverting the changes you did to wp-config? – moraleida Commented May 18, 2012 at 14:16
  • I tried the undo method and Michael way but get "Internal Server Error" :( I did not delete any files or folders – John Doe Commented May 18, 2012 at 14:39
  • my .htacess file looks like this # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-admin/.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress – John Doe Commented May 18, 2012 at 14:42
  • Error also occurs on a non-existent .htaccess. – Laurie Stearn Commented Nov 23, 2023 at 12:31
Add a comment  | 

4 Answers 4

Reset to default 13

Delete .htaccess

type in domain.com/wp-login.php

login.

Dashboard -> Settings -> Permalinks -> Save. (just automatically recreates your .htaccess again).

If the problem persists. Try disabling plugins. Enable plugins 1 by 1 until the problem occurs again. That will narrow down the faulty plugin.

If ALL you did was to change wp-config.php permissions, look on your folder (or on a fresh WP folder) for wp-config-sample.php, make a copy of it, and fill in the database connection lines again.

Then rename wp-config to wp-config-OLD.php and the copy of wp-config-sample to wp-config.php and you should be fine.

Don't delete .htaccess as it may include changes by other plugins like cache creators - at least copy it to .htaccess_bak

It should not be necessary to delete it.

go to yourdomain.com/wp-login.php and login. This should work.

Now rebuild the permalinks: Settings -> Permalinks -> Save

Log out and try again with yourdomain.com/wp-admin

I have to do this every second months, god knows why

We had this issue today on a few of our sites & the problem for us was caused by the NGINX caching that we set up on our servers yesterday.

Clearing the NGINX cache resolved this issue for us, hopefully this saves someone else a couple of hours in the future.

发布评论

评论列表(0)

  1. 暂无评论